| igraph Reference Manual |
|---|
int igraph_average_path_length(const igraph_t *graph, igraph_real_t *res, igraph_bool_t directed, igraph_bool_t unconn);
Arguments:
graph: |
The graph object. |
res: |
Pointer to a real number, this will contain the result. |
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.3. igraph_get_all_shortest_paths — Finds all shortest paths (geodesics) from a vertex to all other vertices |
2.5. igraph_path_length_hist — Create a histogram of all shortest path lenghts >> |