[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [igraph] add edges in python igraph
From: |
Tamas Nepusz |
Subject: |
Re: [igraph] add edges in python igraph |
Date: |
Mon, 19 Jan 2009 12:13:31 +0000 |
> is it possible to set also the color of the new edge?
You can make use of the undocumented igraph feature that the newly added
edge always has the largest ID. So, this should work:
max_edge_id = g.ecount()
g.add_edges((1,2))
g.es[max_edge_id]["color"] = "blue"
(Hmm, actually, there should be a better way to add an edge with
attributes. Maybe some keyword arguments to add_edges. I have to think
about it).
--
Tamas
- [igraph] add edges in python igraph, Simone Gabbriellini, 2009/01/19
- Re: [igraph] add edges in python igraph, Tamas Nepusz, 2009/01/19
- Re: [igraph] add edges in python igraph, Simone Gabbriellini, 2009/01/19
- Re: [igraph] add edges in python igraph,
Tamas Nepusz <=
- Re: [igraph] add edges in python igraph, Simone Gabbriellini, 2009/01/19
- Re: [igraph] add edges in python igraph, Simone Gabbriellini, 2009/01/19
- Re: [igraph] add edges in python igraph, Tamas Nepusz, 2009/01/19
- Re: [igraph] add edges in python igraph, Simone Gabbriellini, 2009/01/19
- Re: [igraph] add edges in python igraph, Tamas Nepusz, 2009/01/19