Struct 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§

Source§

impl<Op, S, Cache> Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: BitSetInterface, Cache: ReduceCache,

Source

pub fn block_iter<'a>(&'a self) -> BlockIter<&'a Self>

Source

pub fn iter<'a>(&'a self) -> IndexIter<&'a Self>

Source

pub fn contains(&self, index: usize) -> bool

Source

pub fn is_empty(&self) -> bool

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,

Source§

fn bitand(self, rhs: Rhs) -> Self::Output

Returns intersection of self and rhs bitsets.

Source§

type Output = Apply<And, &Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the & operator.
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,

Source§

fn bitand(self, rhs: Rhs) -> Self::Output

Returns intersection of self and rhs bitsets.

Source§

type Output = Apply<And, Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the & operator.
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,

Source§

fn bitor(self, rhs: Rhs) -> Self::Output

Returns union of self and rhs bitsets.

Source§

type Output = Apply<Or, &Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the | operator.
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,

Source§

fn bitor(self, rhs: Rhs) -> Self::Output

Returns union of self and rhs bitsets.

Source§

type Output = Apply<Or, Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the | operator.
Source§

impl<Op, S, Cache> BitSetBase for Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: LevelMasks,

Source§

const TRUSTED_HIERARCHY: bool

true if S and Op are TrustedHierarchy.

Source§

type Conf = <<S as Iterator>::Item as BitSetBase>::Conf

Source§

impl<Op, S, Cache> BitSetInterface for &Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: BitSetInterface, Cache: ReduceCache,

Source§

fn block_iter(&self) -> BlockIter<&Self>

Source§

fn iter(&self) -> IndexIter<&Self>

Source§

fn into_block_iter(self) -> BlockIter<Self>

Source§

fn contains(&self, index: usize) -> bool

Source§

fn is_empty(&self) -> bool

O(1) if TRUSTED_HIERARCHY, O(N) otherwise.
Source§

impl<Op, S, Cache> BitSetInterface for Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: BitSetInterface, Cache: ReduceCache,

Source§

fn block_iter(&self) -> BlockIter<&Self>

Source§

fn iter(&self) -> IndexIter<&Self>

Source§

fn into_block_iter(self) -> BlockIter<Self>

Source§

fn contains(&self, index: usize) -> bool

Source§

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,

Source§

fn bitxor(self, rhs: Rhs) -> Self::Output

Returns symmetric difference of self and rhs bitsets.

Source§

type Output = Apply<Xor, &Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the ^ operator.
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,

Source§

fn bitxor(self, rhs: Rhs) -> Self::Output

Returns symmetric difference of self and rhs bitsets.

Source§

type Output = Apply<Xor, Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the ^ operator.
Source§

impl<Op: Clone, S: Clone, Cache: Clone> Clone for Reduce<Op, S, Cache>

Source§

fn clone(&self) -> Reduce<Op, S, Cache>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Op, S, Cache> Debug for Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: BitSetInterface, Cache: ReduceCache,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<Op, S, Cache> IntoIterator for &Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: BitSetInterface, Cache: ReduceCache,

Source§

type Item = usize

The type of the elements being iterated over.
Source§

type IntoIter = IndexIter<&Reduce<Op, S, Cache>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<Op, S, Cache> IntoIterator for Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: BitSetInterface, Cache: ReduceCache,

Source§

type Item = usize

The type of the elements being iterated over.
Source§

type IntoIter = IndexIter<Reduce<Op, S, Cache>>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. 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,

Source§

fn eq(&self, other: &Rhs) -> bool

Works faster with TRUSTED_HIERARCHY.

1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
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,

Source§

fn sub(self, rhs: Rhs) -> Self::Output

Returns difference of self and rhs bitsets.

Or relative complement of rhs in self.

Source§

type Output = Apply<Sub, &Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the - operator.
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,

Source§

fn sub(self, rhs: Rhs) -> Self::Output

Returns difference of self and rhs bitsets.

Or relative complement of rhs in self.

Source§

type Output = Apply<Sub, Reduce<Op, S, Cache>, Rhs>

The resulting type after applying the - operator.
Source§

impl<Op, S, Cache> Eq for Reduce<Op, S, Cache>
where Op: BitSetOp, S: Iterator + Clone, S::Item: BitSetInterface, Cache: ReduceCache,

Auto Trait Implementations§

§

impl<Op, S, Cache> Freeze for Reduce<Op, S, Cache>
where S: Freeze,

§

impl<Op, S, Cache> RefUnwindSafe for Reduce<Op, S, Cache>

§

impl<Op, S, Cache> Send for Reduce<Op, S, Cache>
where S: Send, Op: Send, Cache: Send,

§

impl<Op, S, Cache> Sync for Reduce<Op, S, Cache>
where S: Sync, Op: Sync, Cache: Sync,

§

impl<Op, S, Cache> Unpin for Reduce<Op, S, Cache>
where S: Unpin, Op: Unpin, Cache: Unpin,

§

impl<Op, S, Cache> UnwindSafe for Reduce<Op, S, Cache>
where S: UnwindSafe, Op: UnwindSafe, Cache: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.