igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Passability of nodes


From: Johannes Radinger
Subject: Re: [igraph] Passability of nodes
Date: Tue, 27 Nov 2018 20:56:35 +0100

Thanks Tamas, 
exactly, Graph.TupleList() was the function I was looking for.

cheers,
Johannes

On Tue, Nov 27, 2018 at 1:22 PM Tamas Nepusz <address@hidden> wrote:
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

_______________________________________________
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]