[RFC] GraphInterface.jl: An interface proposal for Graphs.jl version 2.0

This is just an oversight and rather easy to add. But I don’t see how it solves the problem for undirected edges?

It’s a good summary!

At the moment I think GraphsBase.jl and GraphInterface.jl do 1, and we could add 2 without much sweat.
The trouble with 3 is that outneighbors / inneighbors (or outedges / inedges) are not necessarily indexable cleanly, or even at all. Some graph types generate them on the fly, and forcing indexation would be an additional interface constraint. But if we can manage that, I agree that it sounds like the best of both worlds.

Etienne’s original idea in GraphsBase.jl was to have a create_vertex_container(g, T) method that generates the best container with values of type T and keys of vertex type. That, way when Dijkstra wants to e.g. store vertex distances, it can do so in a Dict (default fallback) or in a Vector (if the vertices are contiguous integers) depending on what the graph type supports. This trick allows at least integer-based graphs to be fast, instead of everyone using dictionaries everywhere.

I opened an issue to discuss these integers-to-labels aspects.