Struct bitmap::Bitmap
[−]
[src]
pub struct Bitmap<S: Storage, E: Element> { /* fields omitted */ }
A dense bitmap, intended to store small bitslices (<= width of u64).
That is, this type represents an array of values, where each value is E::width(instance)
bits long,
and the bits are stored contiguously. The first value is packed into the least significant bits
of the first word.
Methods
impl<S: Storage, E: Element> Bitmap<S, E>
[src]
fn from_storage(entries: usize, w: E::W, storage: S) -> Option<Bitmap<S, E>>
fn get(&self, i: usize) -> Option<E::R>
Get the i
th bitslice, returning None on out-of-bounds or if E::from_bits
returns None.
fn set(&mut self, i: usize, value: E::R) -> bool
Set the i
th bitslice to value
, returning false on out-of-bounds or if value
contains
bits outside of the least significant E::width(w)
bits.
fn len(&self) -> usize
Length in number of bitslices cointained.
fn usize_len(&self) -> usize
Size of the internal buffer, in number of usize
s.