Function tantivy_bitpacker::minmax

source ·
pub fn minmax<I, T>(vals: I) -> Option<(T, T)>
where I: Iterator<Item = T>, T: Copy + PartialOrd,
Expand description

Computes the (min, max) of an iterator of PartialOrd values.

For values implementing Ord (in a way consistent to their PartialOrd impl), this function behaves as expected.

For values with partial ordering, the behavior is non-trivial and may depends on the order of the values. For floats however, it simply returns the same results as if NaN were skipped.