pub trait EstimateIterCardinality {
    // Required method
    fn estimate_cardinality<const PRECISION: usize, const BITS: usize>(
        self
    ) -> f32;
}
Expand description

A trait for estimating the cardinality of an iterator.

Required Methods§

source

fn estimate_cardinality<const PRECISION: usize, const BITS: usize>(self) -> f32

Estimate the cardinality of the iterator.

Arguments
  • self - An iterator over elements to estimate the cardinality of.
Type parameters
  • PRECISION - The precision to use for the HyperLogLog counter.
  • BITS - The number of bits per register in the HyperLogLog counter.

Implementors§

source§

impl<I, T: Hash> EstimateIterCardinality for Iwhere I: Iterator<Item = T>,