Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions for Edge Adjacency #349

Open
narnold0 opened this issue Mar 3, 2024 · 1 comment
Open

Functions for Edge Adjacency #349

narnold0 opened this issue Mar 3, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@narnold0
Copy link

narnold0 commented Mar 3, 2024

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?

@henrik-wolf
Copy link
Contributor

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.

@gdalle gdalle added the enhancement New feature or request label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants