Skip to content
This repository was archived by the owner on Oct 21, 2021. It is now read-only.
This repository was archived by the owner on Oct 21, 2021. It is now read-only.

Inconsistence between out_edges and edge_index #196

@malbarbo

Description

@malbarbo

Let's consider this example

julia> g = simple_graph(2, is_directed=false)
Undirected Graph (2 vertices, 0 edges)

julia> add_edge!(g, 1, 2)
edge [1]: 1 -- 2

julia> out_edges(1, g)[1] == out_edges(2, g)[1]
false

julia> edge_index(out_edges(1, g)[1], g) == edge_index(out_edges(2, g)[1], g)
true

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions