You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetworkX's all_simple_paths will find duplicate paths when there are multiple paths between a pair of nodes. For example, the following graph
Source
Target
A
B
B
C
B
C
C
D
would produce two pathways from A to D: (A, B, C, D), and (A, B, C, D). As a pathway, they would be identical, although they include two different edges that are treated differently within NetworkX.
Currently acquisition_pathways just places pathways in a set, which destroys duplicate pathways without accounting for them in any way.
The question is, should duplicate pathways be noted separately, perhaps in a list, but then the pathways be returned as a set (no duplicates)? Or should the pathways list contain duplicates within it? If so, it cannot remain a set. It could be a list (ordered, though does it matter?), or potentially a collections.Counter, which is as close as python gets to a multiset
The text was updated successfully, but these errors were encountered:
NetworkX's
all_simple_paths
will find duplicate paths when there are multiple paths between a pair of nodes. For example, the following graphwould produce two pathways from
A
toD
: (A, B, C, D), and (A, B, C, D). As a pathway, they would be identical, although they include two different edges that are treated differently within NetworkX.Currently
acquisition_pathways
just places pathways in a set, which destroys duplicate pathways without accounting for them in any way.The question is, should duplicate pathways be noted separately, perhaps in a list, but then the pathways be returned as a set (no duplicates)? Or should the pathways list contain duplicates within it? If so, it cannot remain a set. It could be a list (ordered, though does it matter?), or potentially a collections.Counter, which is as close as python gets to a multiset
The text was updated successfully, but these errors were encountered: