petgraph / fixedbitset

A simple bitset container for Rust
https://docs.rs/fixedbitset/
Apache License 2.0
126 stars 47 forks source link

Add a zeroes iterator #89

Closed james7132 closed 1 year ago

james7132 commented 1 year ago

Adds an iterator, like Ones, named Zeroes that iterates over the unset bits in a bitset.

Note this is likely a bit less efficient than the Ones iterator due to it needing to ensure that the trailing zeros in the last block are not included in the results.

Added a test to ensure it was working as expected.

Fixes #7. Fixes #9. Supersedes #32. Supersedes #10.