Hi you clever people out there,
I use this Pyhon statement to identify edges in a directed graph, G, from a set of nodes and searching the graph in reversed order:
EdgeList = list(nx.edge_dfs(G,nodes,orientation='reverse'))
When doing so, all edges belong to the same class.
Meanwhile, what I need is to subdivide the result, so the edges are assigned various class values in accordance with the attached picture. Thus, all edges found by a reversed search from node 1 (blue edges) are assigned a class value of 1 matching the node number, and what is found by a reversed search from node 2 (green edges) but leaving out the blue edges already found in class 1 are assigned a value of 2.
Do you have a solution to this problem?
Univ. of Copenhagen, Denmark