|
From: | Tamas Nepusz |
Subject: | Re: [igraph] how to select eid on the basis of an edge attribute |
Date: | Thu, 22 Jan 2009 21:11:08 +0000 |
Hi Simone,
Yup, but since you will be checking the _edges_ adjacent to v1, you should find the adjacent edges in step 1 instead of the neighbours. So:Could this be the a good strategy? 1) find all the neighbors of v1: 2) for each neighbor in the list: 3) check if they are blue-linked with v1 (using get_eids()):
nei_edges = g.adjacent(v1) for nei_edge in nei_edges: if g.es[nei_edge]["color"] == "blue": # do this else: # do that -- T.
[Prev in Thread] | Current Thread | [Next in Thread] |