Trait hibitset::BitSetLike
[−]
[src]
pub trait BitSetLike { fn layer3(&self) -> usize; fn layer2(&self, i: usize) -> usize; fn layer1(&self, i: usize) -> usize; fn layer0(&self, i: usize) -> usize; fn iter(self) -> BitIter<Self>
where
Self: Sized, { ... } fn par_iter(self) -> BitParIter<Self>
where
Self: Sized, { ... } }
A generic interface for BitSetLike
-like types.
Every BitSetLike
is hierarchical, meaning that there
are multiple levels that branch out in a tree like structure.
Layer0 each bit represents one Index of the set
Layer1 each bit represents one usize
of Layer0, and will be
set only if the word below it is not zero.
Layer2 has the same arrangement but with Layer1, and Layer3 with Layer2.
This arrangement allows for rapid jumps across the key-space.
Required Methods
fn layer3(&self) -> usize
Return a usize where each bit represents if any word in layer2 has been set.
fn layer2(&self, i: usize) -> usize
Return the usize from the array of usizes that indicates if any bit has been set in layer1
fn layer1(&self, i: usize) -> usize
Return the usize from the array of usizes that indicates if any bit has been set in layer0
fn layer0(&self, i: usize) -> usize
Return a usize that maps to the direct 1:1 association with each index of the set
Provided Methods
fn iter(self) -> BitIter<Self> where
Self: Sized,
Self: Sized,
Create an iterator that will scan over the keyspace
fn par_iter(self) -> BitParIter<Self> where
Self: Sized,
Self: Sized,
Create a parallel iterator that will scan over the keyspace
Implementations on Foreign Types
impl<'a, T> BitSetLike for &'a T where
T: BitSetLike,
[src]
T: BitSetLike,
Implementors
impl BitSetLike for AtomicBitSet
impl<A: BitSetLike, B: BitSetLike> BitSetLike for BitSetAnd<A, B>
impl<A: BitSetLike, B: BitSetLike> BitSetLike for BitSetOr<A, B>
impl<A: BitSetLike> BitSetLike for BitSetNot<A>
impl<A: BitSetLike, B: BitSetLike> BitSetLike for BitSetXor<A, B>
impl BitSetLike for BitSet