[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[igraph] changing an edge's target or source
From: |
Benjamin Fields |
Subject: |
[igraph] changing an edge's target or source |
Date: |
Wed, 10 Feb 2010 19:34:31 +0000 |
Apologies if I'm missing something obvious or direct, but is there a simple way
to change an edge's source or target? I'm using the python bindings.
Specifically, I'm trying to do this:
(for some graph g)
> edge = g.es[0]
> edge.source = 100
where 100 is a valid vertex index. This of course causes an AttributeError as
the source attribute is not writable. The same also appears to be true for the
target attribute. Is there a means to change these attributes via some sort of
access function? I'm using igraph v0.6. I'd really love to not have to
remove and recreate these edges...
Thanks for your help.
/Ben
Ben Fields
PhD Candidate
Dept. of Computing
Goldsmiths, University of London
e: address@hidden
p: +44 (0) 20 7078 5170
---------------------------------------------
"Which is more musical: a truck passing by a factory or a truck passing by a
music school?" --John Cage
- [igraph] changing an edge's target or source,
Benjamin Fields <=