igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] testing if two nodes are connected


From: Tamás Nepusz
Subject: Re: [igraph] testing if two nodes are connected
Date: Thu, 13 Feb 2014 10:24:32 +0100

> I am trying to test if two specific nodes in a graph have an edge:
> […]
> I am thinking there might be a better message than what I am doing. Is there 
> a method like is_connected(v1, v2)?

It’s called are_connected(v1, v2).
Also, you could use get_eid(v1, v2, error=False), in which case you get a 
return value of -1 if there is no edge between v1 and v2.

T.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]