igraph-help
[Top][All Lists]
Advanced

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

[igraph] testing if two nodes are connected


From: Ahmed Abdeen Hamed
Subject: [igraph] testing if two nodes are connected
Date: Thu, 13 Feb 2014 01:07:12 -0500

Hello again!

I am trying to test if two specific nodes in a graph have an edge:

for x in g.vs():
for y in g.vs():
print str(x.index) + "," + str(y.index)
try:
edge_id = g.get_eid(x.index,y.index)
break
except ValueError:
print x["name"] + "," + y["name"]


I am thinking there might be a better message than what I am doing. Is there a method like is_connected(v1, v2)? 

Thanks again for all your help!

-Ahmed

reply via email to

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