elisabetta.bergamini at kit.edu
Wed Sep 9 11:05:00 CEST 2015
It’s not supposed to work on disconnected graphs (closeness is defined only on connected graphs).
I agree that an exception should be thrown.
However, there are extensions of the definition of closeness that work also for disconnected graphs, e.g.:
c(v) = (r(v)-1)^2/((n-1)*f(v)), where r(v) is the number of node reachable from v and f(v) is the sum of the distances from v to these nodes.
We could either implement that (also in Closeness, not only in ApproxCloseness) or restrict ourselves to connected graphs and throw an exception.
On Sep 9, 2015, at 10:43, Christian Staudt <christian.staudt at kit.edu> wrote:
> Is that supposed to work on disconnected graphs? An example output for
> centrality.ApproxCloseness(G, 42).run().scores()
> on a disconnected graph looks like this:
> Maybe that is on purpose. If not it should throw an exception. Could we please clarify this?
> NetworKit mailing list
> NetworKit at ira.uni-karlsruhe.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NetworKit