-
Notifications
You must be signed in to change notification settings - Fork 81
Inconsistence between out_edges and edge_index #196
Comments
I think the existing behavior is reasonable, since the edges are technically different. That is, I also note that |
A simple solution is to compare the index of the edges. This does not create a issue with directed graph, because the edges Using edges method of undirect graphs in Networkx gives the same result. Interesting in graph-tool (https://graph-tool.skewed.de/) the edges are equals. |
Boost got it right. See Undirect Graphs http://www.boost.org/doc/libs/1_59_0/libs/graph/doc/graph_concepts.html, out_edges http://www.boost.org/doc/libs/1_59_0/libs/graph/doc/IncidenceGraph.html, and in_edges http://www.boost.org/doc/libs/1_59_0/libs/graph/doc/BidirectionalGraph.html |
I've been struggling with this because in my implementation edges don't have indices (they're in a The concept of directedness of edges therefore is a new construct and introduces more complexity than benefit at this time in my case. Interesting discussion though! |
Let's consider this example
Conceptually the out edges in the example should be equal (g is undirected). It's inconsistent and confusing the index of different edges to be equal, modifying a map using the index of different edges could change the same value.
Networkx gives the same result...
The text was updated successfully, but these errors were encountered: