igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Traversing edges in sorted order


From: lesshaste
Subject: Re: [igraph] Traversing edges in sorted order
Date: Tue, 30 Jul 2013 06:31:58 +0100 (BST)

Thank you that is very helpful.

Is the edge id order just the order the edges were read in in the input file? If so, this would let me traverse outgoing edges in order of weight by sorting the input. Or is this too optimistic?


From: Tamás Nepusz <address@hidden>;
To: Help for igraph users <address@hidden>;
Subject: Re: [igraph] Traversing edges in sorted order
Sent: Mon, Jul 29, 2013 8:36:54 PM

> Would you mind explaining what order edges are returned in. I notice that g.es (looking only at the edges that are outgoing from node v) and g.neighbors(v, mode=OUT) seem to return edges in a different order.
g.neighbors() returns the *node IDs* that are neighbors of a given node (and not the edge IDs), sorted by node ID.
g.incident() returns the *edge IDs* that are incident on a given node, but no specific ordering is guaranteed.
g.es.select(_source=v) or g.es.select(_form=v) returns the edge IDs that originate from the given node, sorted by edge ID, but this is implemented in pure Python so it's much less efficient than using g.incident().

--
T.


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

reply via email to

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