add

fun add(value: String): Patch<HyperLogLog>

Add value to the sketch. Returns a Patch whose delta is a sparse fragment — at most one register is non-zero (the one that changed). If the new ρ value does not exceed the currently stored max the delta is all-zero (a no-op fragment; Quilter skips broadcasting it).

The receiver is unchanged. Apply the patch with piece: val next = hll.piece(hll.add(value)).

The value is hashed with us.tractat.kuilt.crdt.internal.Murmur3 (32-bit). The top precision bits select the register index; the remaining bits determine the position of the leftmost 1 bit (plus one), which is the value stored if larger than the current register entry.