Strict packed sketch ranks #
The zero-bit branch of arbitrary-query correction requires a strict rank. Subtracting the number of sketches at least the query from the node occupancy handles equality and zero queries directly.
Main definitions #
LowerRankProgram.code: eight standard instructions for strict sketch rank.
Main results #
LowerRankProgram.exec: checked execution returning the number of sketches below the query.
References #
The input register layout agrees with RankProgram, except register seven is occupancy
and register one contains the original sketches rather than their complements.
Instances For
Packed guarded sketches.
Instances For
Replication multiplier.
Instances For
Mask of field guards.
Instances For
Payload width.
Instances For
Middle digit divisor.
Instances For
Field radix.
Instances For
Number of stored sketches.
Instances For
Scratch for the replicated query.
Instances For
Final strict rank.
Instances For
Count guards for q ≤ sᵢ, then subtract the count from the occupancy.
Instances For
Exact state after all eight instructions.
Instances For
Eight checked instructions return the strict rank, including zero and equality queries. The node parameters and memory are preserved; query compression and constant loading are separate. The full guard-count product fits under the stated packed-width bound.