[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] adding attribute to an edge, depending on nodes
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] adding attribute to an edge, depending on nodes |
Date: |
Fri, 07 Nov 2008 14:42:10 +0000 |
> AFAIK is not possibile, when creating the edge, to set some attribute
> for the edge.
> How can i set attribute to that edge, without revisiting the graph?
Hmmm, good point, we should have an attrs= keyword argument for
add_edges and add_vertices. In the meanwhile, you can (ab)use the fact
that the most recently added edge always has the highest ID:
g.add_edges([(1,2)])
g.es[g.ecount()-1]["label"] = "123"
--
Tamas
- [igraph] adding attribute to an edge, depending on nodes, Marco, 2008/11/07
- Re: [igraph] adding attribute to an edge, depending on nodes,
Tamas Nepusz <=
- Re: [igraph] adding attribute to an edge, depending on nodes, Marco, 2008/11/07
- Re: [igraph] adding attribute to an edge, depending on nodes, Tamas Nepusz, 2008/11/07
- Re: [igraph] adding attribute to an edge, depending on nodes, Marco, 2008/11/07
- Re: [igraph] adding attribute to an edge, depending on nodes, Tamas Nepusz, 2008/11/07
- Re: [igraph] adding attribute to an edge, depending on nodes, Marco, 2008/11/07
- [igraph] subgraph from edge seq, Sergio Jiménez, 2008/11/10
- Re: [igraph] subgraph from edge seq, Tamas Nepusz, 2008/11/10
- RE: [igraph] subgraph from edge seq, Sergio Jiménez, 2008/11/10
Re: [igraph] adding attribute to an edge, depending on nodes, Neal Becker, 2008/11/07