A floor from its fields. referenceId is the stateId of the reference
(32 bytes); counts are numbers. The core validates the rest: nulls >= 1,
totalRows >= 1, changedRows <= totalRows and
hamming <= config.unitsPerRow; anything else is InvalidInput. The
floor has no per-row data: that comes only from Floor.measure
or Floor.fromJson.
How many of the nulls were distinct states, from 1 to nulls: two
nulls are the same when their candidates have the same contentDigest.
With 1 the per-row check adds no false alarm; when the nulls vary,
each check can reject an unchanged rebuild with probability up to
1 / (nulls + 1). undefined for a floor without per-row data.
The largest hamming of any changed row of any null (0 when no null
changed a row); undefined for a floor without per-row data: one from
the constructor, from measure without perRow, or read from JSON
without it.
How many null diffs the floor was measured from.
stateId of the reference the nulls were taken against (32 bytes).
The floor schema as a plain object (JSON.parse of Floor.toJson):
the config as in diff reports, the reference id as lowercase hex,
counts as numbers.
Release the native handle. Idempotent; later use raises InvalidInput.
The floor's JSON form, written by the core: the floor schema with
max_hamming and distinct_nulls when the floor records them, keys in schema order, no
whitespace. The same text in every binding.
Floor(1 of 3 rows, hamming 1, from 3 nulls); the same text in every binding.
StaticfromThe inverse of Floor.asDict, by the core's rules
(Floor.fromJson of JSON.stringify(data)). Anything else is
InvalidInput.
StaticfromRead a floor from its JSON form, by the core's rules: the schema's keys
strictly (each at most once, integer counts, max_hamming and
distinct_nulls optional), other keys ignored, and the construction
rules. Anything else is InvalidInput.
StaticmeasureThe envelope of one or more null diffs of one reference; every input is
within the result. Incompatible when the nulls differ in config, id
kind or reference (field is the offending index); InvalidInput when
one is not a null: rows added or removed, none in common, or a change to
encoder or encoder_revision. The floor records no per-row data.
Floor.measure that also records what the checks in options
need: with { perRow: true }, maxHamming and distinctNulls for the
per-row check. SEMQ 1.0 cannot read a floor saved with them.
An envelope of observed variation,
(changedRows, totalRows, hamming)measured fromnullsnull diffs, bound to the config, the id kind and the reference state those nulls were taken against.A diff is within the floor when it removes no rows, shares at least one row with its reference, changes at most
changedRows / totalRowsof the shared rows, its p99 hamming does not exceedhamming, and it changes neitherencodernorencoder_revision. Applying a floor to a diff of another config, id kind or reference throwsIncompatible. No probabilistic coverage is claimed.Floor.measure(diffs, { perRow: true })also records the per-row data the per-row check of Diff.evaluate needs:maxHamming, the largest hamming of any changed row of any null, anddistinctNulls. Without it the JSON form is the one SEMQ 1.0 reads. The JSON form (Floor.toJson, Floor.fromJson, Floor.asDict, Floor.fromDict) is written and read by the core, with the same rules in every binding.Owns a native handle: call Floor.dispose when done, or let the finalizer free it.