Struct hi_sparse_bitset::Reduce
source · pub struct Reduce<Op, S, Cache> { /* private fields */ }
Expand description
Bitsets iterator reduction, as lazy bitset.
Constructed by reduce and reduce_w_cache.
Implementations§
Trait Implementations§
source§impl<Op, S, Cache, Rhs> BitAnd<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> BitAnd<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache, Rhs> BitAnd<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> BitAnd<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache, Rhs> BitOr<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> BitOr<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache, Rhs> BitOr<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> BitOr<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache> BitSetBase for Reduce<Op, S, Cache>
impl<Op, S, Cache> BitSetBase for Reduce<Op, S, Cache>
source§const TRUSTED_HIERARCHY: bool = _
const TRUSTED_HIERARCHY: bool = _
true if S and Op are TrustedHierarchy
.
type Conf = <<S as Iterator>::Item as BitSetBase>::Conf
source§impl<Op, S, Cache> BitSetInterface for &Reduce<Op, S, Cache>
impl<Op, S, Cache> BitSetInterface for &Reduce<Op, S, Cache>
fn block_iter(&self) -> CachingBlockIter<&Self> ⓘ
fn iter(&self) -> CachingIndexIter<&Self> ⓘ
fn into_block_iter(self) -> CachingBlockIter<Self> ⓘ
fn contains(&self, index: usize) -> bool
source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
O(1) if TRUSTED_HIERARCHY, O(N) otherwise.
source§impl<Op, S, Cache> BitSetInterface for Reduce<Op, S, Cache>
impl<Op, S, Cache> BitSetInterface for Reduce<Op, S, Cache>
fn block_iter(&self) -> CachingBlockIter<&Self> ⓘ
fn iter(&self) -> CachingIndexIter<&Self> ⓘ
fn into_block_iter(self) -> CachingBlockIter<Self> ⓘ
fn contains(&self, index: usize) -> bool
source§fn is_empty(&self) -> bool
fn is_empty(&self) -> bool
O(1) if TRUSTED_HIERARCHY, O(N) otherwise.
source§impl<Op, S, Cache, Rhs> BitXor<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> BitXor<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache, Rhs> BitXor<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> BitXor<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache> IntoIterator for &Reduce<Op, S, Cache>
impl<Op, S, Cache> IntoIterator for &Reduce<Op, S, Cache>
source§impl<Op, S, Cache> IntoIterator for Reduce<Op, S, Cache>
impl<Op, S, Cache> IntoIterator for Reduce<Op, S, Cache>
source§impl<Op, S, Cache> LevelMasks for Reduce<Op, S, Cache>
impl<Op, S, Cache> LevelMasks for Reduce<Op, S, Cache>
fn level0_mask(&self) -> <Self::Conf as Config>::Level0BitBlock
source§unsafe fn level1_mask(
&self,
level0_index: usize
) -> <Self::Conf as Config>::Level1BitBlock
unsafe fn level1_mask( &self, level0_index: usize ) -> <Self::Conf as Config>::Level1BitBlock
Safety Read more
source§impl<Op, S, Cache> LevelMasksIterExt for Reduce<Op, S, Cache>
impl<Op, S, Cache> LevelMasksIterExt for Reduce<Op, S, Cache>
§type IterState = <<Cache as ReduceCache>::Impl<Op, S> as ReduceCacheImpl>::IterState
type IterState = <<Cache as ReduceCache>::Impl<Op, S> as ReduceCacheImpl>::IterState
Consists from child states (if any) + Self state. Read more
§type Level1BlockData = <<Cache as ReduceCache>::Impl<Op, S> as ReduceCacheImpl>::Level1BlockData
type Level1BlockData = <<Cache as ReduceCache>::Impl<Op, S> as ReduceCacheImpl>::Level1BlockData
Level1 block related data, used to speed up data_mask access. Read more
fn make_iter_state(&self) -> Self::IterState
source§unsafe fn drop_iter_state(&self, state: &mut ManuallyDrop<Self::IterState>)
unsafe fn drop_iter_state(&self, state: &mut ManuallyDrop<Self::IterState>)
Having separate function for drop not strictly necessary, since
IterState can actually drop itself. But! This allows not to store cache
size within IterState. Which makes FixedCache CacheData ZST, if its childs
are ZSTs, and which makes cache construction and destruction noop. Which is
important for short iteration sessions. Read more
source§unsafe fn init_level1_block_data(
&self,
state: &mut Self::IterState,
level1_block_data: &mut MaybeUninit<Self::Level1BlockData>,
level0_index: usize
) -> (<Self::Conf as Config>::Level1BitBlock, bool)
unsafe fn init_level1_block_data( &self, state: &mut Self::IterState, level1_block_data: &mut MaybeUninit<Self::Level1BlockData>, level0_index: usize ) -> (<Self::Conf as Config>::Level1BitBlock, bool)
Init
level1_block_data
and return (Level1Mask, is_not_empty). Read moresource§unsafe fn data_mask_from_block_data(
level1_blocks: &Self::Level1BlockData,
level1_index: usize
) -> <Self::Conf as Config>::DataBitBlock
unsafe fn data_mask_from_block_data( level1_blocks: &Self::Level1BlockData, level1_index: usize ) -> <Self::Conf as Config>::DataBitBlock
Safety Read more
source§impl<Op, S, Cache, Rhs> PartialEq<Rhs> for Reduce<Op, S, Cache>where
Rhs: LevelMasksIterExt<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> PartialEq<Rhs> for Reduce<Op, S, Cache>where
Rhs: LevelMasksIterExt<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache, Rhs> Sub<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> Sub<Rhs> for &Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
source§impl<Op, S, Cache, Rhs> Sub<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache, Rhs> Sub<Rhs> for Reduce<Op, S, Cache>where
Rhs: BitSetInterface<Conf = <Self as BitSetBase>::Conf>,
Op: BitSetOp,
S: Iterator + Clone,
S::Item: BitSetInterface,
Cache: ReduceCache,
impl<Op, S, Cache> Eq for Reduce<Op, S, Cache>
Auto Trait Implementations§
impl<Op, S, Cache> RefUnwindSafe for Reduce<Op, S, Cache>
impl<Op, S, Cache> Send for Reduce<Op, S, Cache>
impl<Op, S, Cache> Sync for Reduce<Op, S, Cache>
impl<Op, S, Cache> Unpin for Reduce<Op, S, Cache>
impl<Op, S, Cache> UnwindSafe for Reduce<Op, S, Cache>
Blanket Implementations§
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