Function hi_sparse_bitset::reduce

source ·
pub fn reduce<Conf, Op, S>(
    op: Op,
    sets: S
) -> Option<Reduce<Op, S, Conf::DefaultCache>>
where Conf: Config, Op: BinaryOp, S: Iterator + Clone, S::Item: BitSetInterface<Conf = Conf>,
Expand description

Creates a lazy bitset, as bitsets iterator reduction.

“Reduce” term used in Rust’s Iterator::reduce sense.

If the sets is empty - returns None; otherwise - returns the resulting lazy bitset.

sets iterator must be cheap to clone (slice iterator is a good example). It will be cloned AT LEAST once for each returned DataBlock during iteration.

Safety

Panics, if Config::DefaultCache capacity is smaller then sets len.