kumulant

HyperLogLogResult

@Serializable
@SerialName(value = "HyperLogLogResult")
data class HyperLogLogResult(val estimate: Double, val precision: Int, val registers: IntArray, val totalSeen: Long, val hasher: HasherRef = HasherRef.SplitMix64) : HasObservationCount(source)

HyperLogLog snapshot. estimate is the corrected cardinality (linear counting at the small-range, raw HLL elsewhere). registers are the dense rho values per bucket and are required to merge two snapshots without loss; precision selects bucket count m = 2^precision. totalSeen is the unweighted update count.

Constructors

HyperLogLogResult

constructor(estimate: Double, precision: Int, registers: IntArray, totalSeen: Long, hasher: HasherRef = HasherRef.SplitMix64)(source)

Properties

estimate

hasher

Reference to the com.eignex.kumulant.math.LongHasher that produced this sketch.

The mixer decides which register a key touches, so combining sketches built with different mixers is meaningless - it double-counts the same key. Carried on the wire so HyperLogLogStat.merge can refuse it, matching com.eignex.kumulant.stat.sketch.BloomFilterResult and com.eignex.kumulant.stat.sketch.CountMinSketchResult. Defaults to the library default so a payload encoded before the field existed still decodes.

precision

registers

totalSeen

totalWeights

open override val totalWeights: Double(source)

Cumulative weight of observations folded into this result.

Link copied to clipboard
open val isEmpty: Boolean

True when no observation has been folded in, so every other field is a placeholder.

Functions

equals

open operator override fun equals(other: Any?): Boolean(source)

hashCode

open override fun hashCode(): Int(source)

toString

open override fun toString(): String(source)