|
From: | Giovanni Marco Dall'Olio |
Subject: | Re: [igraph] average path length for graphs containing multiple components |
Date: | Wed, 21 Nov 2012 14:42:12 +0100 |
> Hi, I solved this by myself..Great! :) Now, if you want to generalize it to weighted graphs, there are at least two possible ways: either you calculate the average weight of the shortest paths or you still calculate the average path length but take the weights into account when you calculate what the shortest path is. Both are relatively easy to implement if you use the output of get_shortest_paths() or shortest_paths() since they both support weights.
Best,
Tamas
[Prev in Thread] | Current Thread | [Next in Thread] |