[Top][All Lists]

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

[igraph] selecting vertices by name

From: Bernie Hogan
Subject: [igraph] selecting vertices by name
Date: Thu, 21 Apr 2011 11:28:51 +0100

Hi All, 

Long time, no chat. I have a question about syntactic sugar. 

In an earlier version of 0.6 (from May of last year), it is possible to query vertices by name for most of the commands. So for example: 

> G.degree(0) 
will give you the degree of the zeroth node, but after
G.vs[0]["name"] = "node1"

you can also say:

> G.degree("node1")
and it will give the degree of that node. 

However, I want to be able to interact with a node, doing things like assigning attributes to it by querying it. For example
G.vs["node1"].index  rather than keep a parallel list. The problem with the parallel list is that it has to be updated any time I add or delete a node, and so I feel it is not as robust. 

Has that subsequently been implemented? (I'm using a custom compiled 0.6 on Python 2.6). 

Take care,

Dr Bernie Hogan
Research Fellow, Oxford Internet Institute
University of Oxford


reply via email to

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