Last chance! 50% off unlimited learning
Sale ends in
closeness(graph, v=V(graph), mode = "all")
v
.
If there is no (directed) path between vertex $v$ and $i$ then the total number of vertices is used in the formula instead of the path length.
betweenness
, degree
g <- graph.ring(10)
g2 <- graph.star(10)
closeness(g)
closeness(g2, mode="in")
closeness(g2, mode="out")
closeness(g2, mode="all")
Run the code above in your browser using DataLab