Struct skipping_search::CountingIntersection[][src]

pub struct CountingIntersection<S> where
    S: SkippingSearch
{ /* fields omitted */ }

Combines an arbitrary number of SkippingSearch objects, and returns only the items present in at least target_count of them. Having target_count == sub_searches.len() or target_count == 1 is valid but discouraged. Instead use dedicated intersection/union constructs.

Methods

impl<S> CountingIntersection<S> where
    S: SkippingSearch
[src]

Assembles a counting-intersection out of other SkippingSearch objects.

Panics

Will panic if sub_searches.len() < target_count, of if target_count == 0.

Trait Implementations

impl<S> SkippingSearch for CountingIntersection<S> where
    S: SkippingSearch
[src]

Returns the smallest value for which find_and_advance may return true. For efficiency reasons, making sure the value is one for which find_and_advance will return true is preferred, when possible. Read more

Returns whether this contains the passed-in value. Also mutates the receiver to forget about any values smaller than or equal to the item. Read more

Returns a lower/upper bound on the number of values that can be obtained by using self.find_and_advance(self.suggest_next()) repeatedly. (0, None) is a valid, minimally constraining answer. (n, Some(n)) is a maximally constraining answer. Read more

Auto Trait Implementations

impl<S> Send for CountingIntersection<S> where
    S: Send

impl<S> Sync for CountingIntersection<S> where
    S: Sync