| igraph Reference Manual |
|---|
int igraph_diameter(const igraph_t *graph, igraph_integer_t *pres, igraph_integer_t *pfrom, igraph_integer_t *pto, igraph_vector_t *path, igraph_bool_t directed, igraph_bool_t unconn);
Arguments:
graph: |
The graph object. |
pres: |
Pointer to an integer, if not |
pfrom: |
Pointer to an integer, if not |
pto: |
Pointer to an integer, if not |
path: |
Pointer to an initialized vector. If not |
directed: |
Boolean, whether to consider directed paths. Ignored for undirected graphs. |
unconn: |
What to do if the graph is not connected. If
|
Returns:
|
Error code:
|
Time complexity: O(|V||E|), the number of vertices times the number of edges.
<< 2.5. igraph_path_length_hist — Create a histogram of all shortest path lenghts |
2.7. igraph_girth — The girth of a graph is the length of the shortest circle in it. >> |