Thanks! I will need to see what igraph does currently. AFAIR for unreachable vertices it uses a distance of number of nodes + 1.
https://github.com/igraph/igraph/issues/838 Gabor On Tue, Jun 16, 2015 at 5:21 AM, Saeed Rahmani <[email protected]> wrote: > I use igraph in R for calculate graph measure, my graph make in a PIN that > not Connected Graph and is Disconnected Graph. closeness method for > connected graph is good and right calculate, and for Disconnected graph in > not Good! > > library(igraph) > # Create of Graph Matrix for Test Closeness Centrality > g <- read.table(text="A B > 1 2 > 3 4 > 3 5", header=TRUE) > gadj <- get.adjacency(graph.edgelist(as.matrix(g), directed=FALSE)) > igObject <- graph.adjacency(gadj) # convert adjacency matrix to igraph > object > gCloseness <- closeness(igObject,weights = NULL) # Assign Closeness to > Variable for print > > [1] 0.06250000 0.06250000 0.08333333 0.07692308 0.07692308 > > This output is Right ? and if right How to Calculate ? > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
