Trait 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 SMALL_CORRECTIONS: Self::SmallCorrections;
    const NUMBER_OF_REGISTERS: usize = _;
}

Required Associated Constants§

Source

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.

Source

const SMALL_CORRECTIONS: Self::SmallCorrections

The precomputed small corrections used in the HyperLogLog algorithm for better performance.

Provided Associated Constants§

Source

const NUMBER_OF_REGISTERS: usize = _

The number of registers that will be used.

Required Associated Types§

Source

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.

Source

type SmallCorrections: Index<usize, Output = f32> + Copy

Type for small corrections:

Source

type Registers: Index<usize, Output = u32> + Copy + ArrayDefault<u32> + ArrayIter<u32>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Precision for Precision4

Source§

impl Precision for Precision5

Source§

impl Precision for Precision6

Source§

impl Precision for Precision7

Source§

impl Precision for Precision8

Source§

impl Precision for Precision9

Source§

impl Precision for Precision10

Source§

impl Precision for Precision11

Source§

impl Precision for Precision12

Source§

impl Precision for Precision13

Source§

impl Precision for Precision14

Source§

impl Precision for Precision15

Source§

impl Precision for Precision16

Source§

impl Precision for Precision17

Source§

impl Precision for Precision18