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 toggle_range #38

Merged
merged 1 commit into from Apr 19, 2020
Merged

Add toggle_range #38

merged 1 commit into from Apr 19, 2020

Conversation

wirelyre
Copy link
Contributor

@wirelyre wirelyre commented Feb 3, 2020

Without this it's hard to invert an entire bitset.

Bounds checking: The only set bits after fb.toggle_range(_) will be those originally set in fb, or those appearing in mask. Keeping set bits doesn't change the size of the set; and all mask bits are in bounds by definition.

@jrraymond jrraymond merged commit 396097a into petgraph:master Apr 19, 2020
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.

None yet

2 participants