igraph-help
[Top][All Lists]
Advanced

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

[igraph] fastest way to check for existence of edges


From: ASM
Subject: [igraph] fastest way to check for existence of edges
Date: Fri, 6 Mar 2009 01:07:44 -0800 (PST)

Greetings,

What is the appropriate/fastest/efficient way to test for the existence of an 
edge in a network (python interface)?  The only way I can think of is to test 
membership in the list of edges:

elist = g.get_edgelist()
if (0, 3) in elist:
  print "exists"

This searches the list in Python.  But, is there a C function that can be 
called from Python to do this (to be quick when there are many edges)?

Thanks.

ASM












reply via email to

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