Graphs.jl
Graphs.jl copied to clipboard
Functions for Edge Adjacency
The functions for vertex adjacency are quite useful, but there isn't a similar functionality for edges. Would graphs benefit from similar edge versions of these?
I.e.
A function similar to has_edge
but which takes two edges and returns true they share a vertex in the graph.
Also, an edge function counterpart to neighbors/all_neighbors that returns all the edges adj. to a provided edge?
The edge version of neighbours
is planned to be part of interface for Graphs 2.0 (I raised a similar Idea before in #255). Since each graph can have its own edge-type, this function would need to be implemented by each graph as part of the interface, rather than just returning a SimpleEdge
. (Otherwise, edges
could return a different type than inedges
, which will probably lead to confusion...)
Checking if two edges are connected feels like a reasonable addition to me.