hibitset
hibitset copied to clipboard
Hierarchical bit set container
Code: ``` use hibitset::*; fn main() { let mut a = BitSet::new(); let mut b = BitSet::new(); assert!( a.is_empty() && b.is_empty(), "This shouldn't happen!"); a.add(0); b.add(10); assert!( !a.is_empty() && !b.is_empty(),...
Here is the PR for the `serde` feature. I added a simple example using `bincode` in the README. There is no test, I could do that easily but it would...
Is there a way to serialize hibitset to bytes? I could implement Serde and use bincode, but wanted to know if there is an existing way to do this. I...
I think, like any container, `BitSetLike`, or at least `BitSet`, should have a `len` method.
Would be interesting to look at SIMD for optimizing the BitIter. Unsure if it would be worth it with some extensions like AVX512 due to it generally slowing down the...
extends from #28 (Because I wanted to also make API in it to work) This is an experimental PR trying to make the amount of layers in bitset generic using...
It would be cool to have an `BitSetLike` which supports `add_atomic` as `AtomicBItSet` do but also `drain_atomic` which will unset all set bits yield their ids. Implementation should be similar...
The smallest can currently be obtained with `.iter().next()`, but I did not find a way to quickly get the largest. None of the iterators seem to support `.rev()`.
I have several projects which uses collections of BitSet objects intensely, and I need to store them in hashsets or hashmaps (or store structures containing BitSet objects in hashsets or...
This crashes... ```rust use hibitset::AtomicBitSet; fn main() { let bitset = AtomicBitSet::new(); println!("bitset = {:?}", bitset); } ``` The proposed fix implements Debug for AtomicBlock so that the error doesn't...