> However, there is still could be a path between the two vertices. How can I 
> check that a path does not exist and the two vertices are not disconnected?

Use shortest_paths(source=v1, target=v2). You’ll get a 1x1 matrix as a result; 
if its only entry is finite, you have a path between v1 and v2, otherwise you 
don’t. If you plan to do this for many vertex pairs, you can also calculate the 
connected components of the graph using clusters(mode=“weak”) or 
clusters(mode=“strong”). Any two nodes in the same strongly connected component 
are mutually reachable from each other.

T.

_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to