[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] problems with edges
From: |
Davide Setti |
Subject: |
Re: [igraph] problems with edges |
Date: |
Thu, 16 Jul 2009 20:05:43 +0100 |
On Thu, Jul 16, 2009 at 7:48 PM, Figa Pelosa<address@hidden> wrote:
> 2) I now want to check the weight of the edge connecting vertex number 0 to
> vertex number 1, which should be 1.. so I write:
> g.get_eid(0,1)
this is not the weight but the edge id:
(done in ipython)
In [13]: g.get_eid?
Type: builtin_function_or_method
Base Class: <type 'builtin_function_or_method'>
String Form: <built-in method get_eid of Graph object at 0x8d2fd2c>
Namespace: Interactive
Docstring:
get_eid(v1, v2)
Returns the edge ID of an arbitrary edge between vertices v1 and v2
@param v1: the first vertex ID
@param v2: the second vertex ID
@return: the edge ID of an arbitrary edge between vertices v1 and v2
Now you can get the edge (which is an instance of an Edge object) with:
> g.es[g.get_eid(0,1)]
igraph.Edge(<igraph.Graph object at 0x8d2fd2c>,0,{})
What i don't understant is where the weight is stored, because
> g.es.attribute_names()
[]
Regards
--
Davide Setti
blog: http://blog.flatlandia.eu
home: http://www.flatlandia.eu