dense_bitset 0.1.1

A variably sized, heap allocated, dense bitset implemented using no `unsafe` code.
Documentation
  • Coverage
  • 100%
    20 out of 20 items documented20 out of 20 items with examples
  • Size
  • Source code size: 23.48 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.74 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • lcnr/dense_bitset
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • lcnr

Dense Bitset

A dense bitset implemented in rust using only safe code.

Examples

use dense_bitset::BitSet;

let mut set = BitSet::new();

set.insert(7);
set.set(4, true);
set.flip(5);

assert_eq!(set, [7, 4, 5].iter().collect());

set.remove(7);
set.flip(4);
set.set(5, false);

assert!(set.is_empty());

let a: BitSet = [2, 5, 12, 17].iter().collect();
let b: BitSet = [2, 12].iter().collect();

assert!(!a.is_disjoint(&b));
assert!(b.is_subset(&a));
assert!(a.is_superset(&b));