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

Extend Neighbors trait with common aliases #37

Open
pnevyk opened this issue Jan 8, 2023 · 0 comments
Open

Extend Neighbors trait with common aliases #37

pnevyk opened this issue Jan 8, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@pnevyk
Copy link
Owner

pnevyk commented Jan 8, 2023

Add new methods listed below to Neighbors trait. All of them are aliases to an already-provided functionality so they should have a default implementation. These methods should also be added to graph encapsulations in graph module.

  • successors(&self, src: &Self::VertexIndex) -> Self::NeighborsIter<'_> aliased to self.neighbors_directed(src, Outgoing)
  • predecessors(&self, src: &Self::VertexIndex) -> Self::NeighborsIter<'_> aliased to self.neighbors_directed(src, Incoming)
  • out_degree(&self, src: &Self::VertexIndex) -> usize aliased to self.degree_directed(src, Outgoing)
  • in_degree(&self, src: &Self::VertexIndex) -> usize aliased to self.degree_directed(src, Incoming)
@pnevyk pnevyk added the good first issue Good for newcomers label Jan 8, 2023
@pnevyk pnevyk added the enhancement New feature or request label Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant