Crate bit_set
Description
An implementation of a set using a bit vector as an underlying representation for holding unsigned numerical elements.
It should also be noted that the amount of storage necessary for holding a
set of objects is proportional to the maximum of the objects when viewed
as a usize.
Examples
use BitSet;
// It's a regular set
let mut s = new;
s.insert;
s.insert;
s.insert;
s.remove;
if !s.contains
// Can initialize from a `BitVec`
let other = from_bytes;
s.union_with;
// Print 0, 1, 3 in some order
for x in s.iter
// Can convert back to a `BitVec`
let bv = s.into_bit_vec;
assert!;
Structs
- BitSet
- Difference
- Intersection
-
Iter
An iterator for
BitSet. - SymmetricDifference
- Union