igraph-help
[Top][All Lists]
Advanced

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

## Re: [igraph] Passability of nodes

 From: Tamas Nepusz Subject: Re: [igraph] Passability of nodes Date: Tue, 27 Nov 2018 13:19:50 +0100

```You can use Graph.TupleList() to construct a graph from named vertex tuples.

All the best,
T.

On Mon, 26 Nov 2018 at 20:06, Johannes Radinger
<address@hidden> wrote:
>>
>> How about replacing each barrier node V with two nodes VA and VB?
>> Assuming that edges point downstream, you can then rewire the head of
>> all incoming edges of V to VA and the tails of all outgoing edges of V
>> to VB, then place an edge from VA to VB if V is passable in the
>> downstream direction, or from VB to VA if it is passable in the
>> upstream direction.
>>
> Thanks Tamas, that sounds like a great idea. I'll test this ASAP. However, I
> am just struggling with creating a graph from a list of named vertex-pairs.
> So far I have always been using plain integer values starting with 0 which
> represent my vertex IDs...but now since I want to replace each barrier node V
> with two nodes VA and VB, I have created a list of named node-pairs like
> edge_list = [["v1","v2"],"v2","v3"],["v3","v4A"],["v4B","v5"],["v4A","v4B“]].
> It seems that the igraph R libarry has such a function
> (https://igraph.org/r/doc/graph_from_edgelist.html) that accepts a list of
> names. However, is there a corresponding function in the python igraph
> library?
>
> cheers,
> Johannes
> _______________________________________________
> igraph-help mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/igraph-help

```

reply via email to

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