|
From: | Tamas Nepusz |
Subject: | Re: [igraph] how to iterate a vertex seq to find neighbors |
Date: | Mon, 22 Dec 2008 21:04:12 +0100 |
Hi Simone,
Strangely enough, .neighbours() requires a vertex index and not a Vertex object, so this will work:I am wondering how to use the neighbors function... I do: g = igraph.Graph.Read_Pajek(filename) for node in g.vs: vicinato = igraph.GraphBase.neighbors(node, type="IN")
for node in g.vs: vicinato = g.neighbors(node.index, type="IN") or this one: for i in xrange(g.vcount()): vicinato = g.neighbors(i, type="IN") -- T.
[Prev in Thread] | Current Thread | [Next in Thread] |