Skip to main content

inter

Function inter 

Source
pub fn inter<F>(
    scratch: &mut Scratch,
    sets: &[&Set],
    limit: usize,
    f: F,
) -> usize
where F: FnMut(&[u8]),
Expand description

The members every set has, in the order the smallest set holds them.

limit is SINTERCARD’s, and zero means no limit. The count comes back whether or not the caller collected anything, so SINTERCARD is this function with a callback that does nothing.

An empty input, or any empty set, is an empty intersection, which is what Redis says and is also the only sane reading.

A merge when every operand is an intset and a probe otherwise, which is a chooser with something to choose. See plan_for.