igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Detecting a single edge between nodes


From: Gábor Csárdi
Subject: Re: [igraph] Detecting a single edge between nodes
Date: Fri, 26 Jun 2009 11:30:35 +0200

Hi,

what is wrong with
http://igraph.sourceforge.net/doc/html/igraph_are_connected.html ?

The running time will be almost the same I think, but igraph_are_connected is much more readable.

Btw. both this function and your method detect if there is at least one edge between the two vertices.

Best,
Gabor

On Fri, Jun 26, 2009 at 11:17 AM, Thomas Gorochowski <address@hidden> wrote:
Hi there,

I am trying to efficiently come up with a method to detect if there is a edge directly between two node v1, v2. At the moment I am using the following but was wondering what the most efficient method would be where I don't have to effectively remove the error handler.

igraph_integer_t eid;
igraph_set_error_handler(igraph_error_handler_ignore);
if (igraph_get_eid(G, &eid, v1, v2, directed) != 0)
 return TRUE;
else
 return FALSE;

Many thanks,

Tom
--
T.E. Gorochowski
University of Bristol, Centre for Complexity Sciences (BCCS)
http://www.chofski.co.uk, address@hidden



_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help



--
Gabor Csardi <address@hidden>     UNIL DGM


reply via email to

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