igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] how to translate from R to Python...


From: Tamas Nepusz
Subject: Re: [igraph] how to translate from R to Python...
Date: Mon, 22 Sep 2008 15:32:39 +0100

Hi Simone,

maybe the R translation is not the best way to accomplish my task... I just want to subgraph all the nodes with blue edges from a larger graph
It should work this way, so let's try to break it down to smaller components:

- g.es.select(color="green") or g.es(color="green") should return an edge sequence that consists of all edges having color="green". Check that manually by converting it into a list of edge IDs:
idlist = [e.index for e in g.es.select(color="green")]

- if that's OK, move on to adj(g.es.select(color="green")) which should return the IDs of the nodes that have at least one edge adjacent to them

--
Tamas





reply via email to

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