Section navigation

Public classSealed HyperLogLogPlusPlus

Namespace
Rowles.LeanCorpus.Search.Aggregations
Assembly
Rowles.LeanCorpus.dll

Mergeable HyperLogLog++ cardinality sketch using deterministic xxHash64 hashing, higher-precision sparse encoding, empirical bias correction, LinearCounting crossover thresholds and bounded six-bit dense registers.

public sealed class HyperLogLogPlusPlus
Inheritance
HyperLogLogPlusPlus

Public constructor HyperLogLogPlusPlus(int)

Initialises a sketch with precision from 4 to 18.

Public field DefaultPrecision

Default precision, giving 16,384 registers and approximately 0.81% relative standard error.

Public property ExpectedRelativeError

Gets the expected relative standard error, approximately 1.04 / sqrt(m).

Public property IsSparse

Gets whether the sketch is currently using higher-precision sparse storage.

Public property Precision

Gets the configured dense-register precision.

Public property RegisterCount

Gets the number of dense registers.

Public method Add(double)

Adds a numeric value using its deterministic little-endian IEEE-754 representation.

Public method Add(long)

Adds an Int64 value using its deterministic little-endian representation.

Public method AddHash(ulong)

Adds an already stable 64-bit hash.

Public method Estimate()

Estimates the distinct cardinality.

Public method MergeFrom(HyperLogLogPlusPlus)

Merges another sketch with identical configured precision.