[Top][All Lists]

[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: Mon, 26 Nov 2018 20:06:31 +0100

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?


reply via email to

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