kumulant

MinHashResult

@Serializable
@SerialName(value = "MinHashResult")
data class MinHashResult(val numHashes: Int, val seed: Long, val signatures: LongArray, val totalSeen: Long, val hasher: HasherRef = HasherRef.SplitMix64) : HasObservationCount(source)

MinHash signature snapshot. signatures is the per-hash running minimum of splitmix64(value xor splitmix64(seed + i)) over all updates; merging two snapshots takes element-wise min and requires identical numHashes and seed.

Constructors

MinHashResult

constructor(numHashes: Int, seed: Long, signatures: LongArray, totalSeen: Long, hasher: HasherRef = HasherRef.SplitMix64)(source)

Properties

hasher

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

The mixer decides which signature slot a key touches, so combining sketches built with different mixers is meaningless. Carried on the wire so MinHashStat.merge can refuse it, matching com.eignex.kumulant.stat.sketch.BloomFilterResult. Defaults to the library default so a payload without the field still decodes.

numHashes

Number of independent hash functions in the signature.

seed

PRNG seed used to derive the per-hash salts; must match for merge / jaccard.

signatures

Per-hash running minimums; element-wise min produces a valid merge.

totalSeen

Number of update(value) calls absorbed; informational.

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)
Link copied to clipboard

Estimated Jaccard similarity between the two underlying sets - the fraction of slots where signatures agree. Requires matching numHashes, seed and hasher.