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

Add DoubleEndedIterator to Ones for reverse iteration #98

Merged
merged 11 commits into from
Feb 26, 2024

Conversation

tikhu
Copy link
Contributor

@tikhu tikhu commented Oct 18, 2023

Hi,
I needed the ability to iterate through the set in reverse.
I looked into it and implemented the DoubleEndedIterator for Ones.
This makes the iterator struct slightly larger. I added one Block and one index (usize) to the struct.
The pull request also includes testing and benchmarks modifications to utilize this feature.
Benchmark performance remains the same on my machine.
If there is interest in this, I'm happy to implement the same for Zeros.

Copy link
Collaborator

@james7132 james7132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow response, looks good to me.

@james7132 james7132 merged commit 84c1324 into petgraph:master Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants