Trait hyperloglog_rs::prelude::Precision
source · pub trait Precision: Default + Copy + Eq + Serialize + Debug + Send + Sync {
type NumberOfZeros: Copy + Debug + Eq + PartialEq + Primitive<usize> + Primitive<f32> + Send + Sync + Zero + One + Ord + PartialOrd + SubAssign;
type SmallCorrections: Index<usize, Output = f32> + Copy;
type Registers: Index<usize, Output = u32> + Copy + ArrayDefault<u32> + ArrayIter<u32>;
const EXPONENT: usize;
const MAXIMAL: usize;
const SMALL_CORRECTIONS: Self::SmallCorrections;
const NUMBER_OF_REGISTERS: usize = _;
}
Required Associated Types§
sourcetype NumberOfZeros: Copy + Debug + Eq + PartialEq + Primitive<usize> + Primitive<f32> + Send + Sync + Zero + One + Ord + PartialOrd + SubAssign
type NumberOfZeros: Copy + Debug + Eq + PartialEq + Primitive<usize> + Primitive<f32> + Send + Sync + Zero + One + Ord + PartialOrd + SubAssign
The data type to use for the number of zeros registers counter. This should be the smallest possinle data type that allows us to count all the registers without overflowing. We can tollerate a one-off error when counting the number of zeros, as it will be corrected when computing the cardinality as it is known before hand whether this can happen at all.
type Registers: Index<usize, Output = u32> + Copy + ArrayDefault<u32> + ArrayIter<u32>
Required Associated Constants§
sourceconst EXPONENT: usize
const EXPONENT: usize
The exponent of the number of registers, meaning the number of registers that will be used is 2^EXPONENT. This is the p parameter in the HyperLogLog.
sourceconst MAXIMAL: usize
const MAXIMAL: usize
The maximal number that can be represented with the selected NumberOfZeros.
sourceconst SMALL_CORRECTIONS: Self::SmallCorrections
const SMALL_CORRECTIONS: Self::SmallCorrections
The precomputed small corrections used in the HyperLogLog algorithm for better performance.
Provided Associated Constants§
sourceconst NUMBER_OF_REGISTERS: usize = _
const NUMBER_OF_REGISTERS: usize = _
The number of registers that will be used.
Object Safety§
This trait is not object safe.