> What is the most efficient way to check if an edge, given by a tuple
> of source and target vertex names, is present in the graph? I
> understand get_eid could be used along with try-catch, but if there
> are tens of thousands of such tuples to be checked, I doubt try-catch
> would help here. Any suggestions?
get_eid(source, target, error=False) would simply return -1 instead of raising
an exception if the edge does not exist. But there's also the are_connected()
method of the graph which simply returns True or False.

T.

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

Reply via email to