Struct hi_sparse_bitset::BitSet
source · pub struct BitSet<Conf: Config> { /* private fields */ }Expand description
Hierarchical sparse bitset.
Tri-level hierarchy. Highest uint it can hold is Level0Mask::BITS * Level1Mask::BITS * DenseBlock::BITS.
Only last level contains blocks of actual data. Empty(skipped) data blocks are not allocated.
Structure optimized for intersection speed. (Other inter-bitset operations are in fact fast too - but intersection has lowest algorithmic complexity.) Insert/remove/contains is fast O(1) too.
Implementations§
Trait Implementations§
source§impl<'a, Conf> IntoIterator for &'a BitSet<Conf>where
Conf: Config,
impl<'a, Conf> IntoIterator for &'a BitSet<Conf>where
Conf: Config,
§type IntoIter = <<&'a BitSet<Conf> as BitSetInterface>::IntoBlockIter as BlockIterator>::IndexIter
type IntoIter = <<&'a BitSet<Conf> as BitSetInterface>::IntoBlockIter as BlockIterator>::IndexIter
Which kind of iterator are we turning this into?
source§impl<Conf> IntoIterator for BitSet<Conf>where
Conf: Config,
impl<Conf> IntoIterator for BitSet<Conf>where
Conf: Config,
§type IntoIter = <<BitSet<Conf> as BitSetInterface>::IntoBlockIter as BlockIterator>::IndexIter
type IntoIter = <<BitSet<Conf> as BitSetInterface>::IntoBlockIter as BlockIterator>::IndexIter
Which kind of iterator are we turning this into?
Auto Trait Implementations§
impl<Conf> RefUnwindSafe for BitSet<Conf>where
<Conf as Config>::DataBitBlock: RefUnwindSafe,
<Conf as Config>::DataBlockIndex: RefUnwindSafe,
<Conf as Config>::Level0BitBlock: RefUnwindSafe,
<Conf as Config>::Level0BlockIndices: RefUnwindSafe,
<Conf as Config>::Level1BitBlock: RefUnwindSafe,
<Conf as Config>::Level1BlockIndex: RefUnwindSafe,
<Conf as Config>::Level1BlockIndices: RefUnwindSafe,
impl<Conf> Send for BitSet<Conf>where
<Conf as Config>::DataBitBlock: Send,
<Conf as Config>::DataBlockIndex: Send,
<Conf as Config>::Level0BitBlock: Send,
<Conf as Config>::Level0BlockIndices: Send,
<Conf as Config>::Level1BitBlock: Send,
<Conf as Config>::Level1BlockIndex: Send,
<Conf as Config>::Level1BlockIndices: Send,
impl<Conf> Sync for BitSet<Conf>where
<Conf as Config>::DataBitBlock: Sync,
<Conf as Config>::DataBlockIndex: Sync,
<Conf as Config>::Level0BitBlock: Sync,
<Conf as Config>::Level0BlockIndices: Sync,
<Conf as Config>::Level1BitBlock: Sync,
<Conf as Config>::Level1BlockIndex: Sync,
<Conf as Config>::Level1BlockIndices: Sync,
impl<Conf> Unpin for BitSet<Conf>where
<Conf as Config>::DataBitBlock: Unpin,
<Conf as Config>::DataBlockIndex: Unpin,
<Conf as Config>::Level0BitBlock: Unpin,
<Conf as Config>::Level0BlockIndices: Unpin,
<Conf as Config>::Level1BitBlock: Unpin,
<Conf as Config>::Level1BlockIndex: Unpin,
<Conf as Config>::Level1BlockIndices: Unpin,
impl<Conf> UnwindSafe for BitSet<Conf>where
<Conf as Config>::DataBitBlock: UnwindSafe,
<Conf as Config>::DataBlockIndex: UnwindSafe,
<Conf as Config>::Level0BitBlock: UnwindSafe,
<Conf as Config>::Level0BlockIndices: UnwindSafe,
<Conf as Config>::Level1BitBlock: UnwindSafe,
<Conf as Config>::Level1BlockIndex: UnwindSafe,
<Conf as Config>::Level1BlockIndices: UnwindSafe,
Blanket Implementations§
source§impl<T> BitSetInterface for Twhere
T: LevelMasksExt + IntoIterator<Item = usize>,
impl<T> BitSetInterface for Twhere
T: LevelMasksExt + IntoIterator<Item = usize>,
type BlockIter<'a> = CachingBlockIter<&'a T> where T: 'a
fn block_iter(&self) -> <T as BitSetInterface>::BlockIter<'_>
type Iter<'a> = <<T as BitSetInterface>::BlockIter<'a> as BlockIterator>::IndexIter where T: 'a
fn iter(&self) -> <T as BitSetInterface>::Iter<'_>
type IntoBlockIter = CachingBlockIter<T>
fn into_block_iter(self) -> <T as BitSetInterface>::IntoBlockIter
fn contains(&self, index: usize) -> bool
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more