Expand description
Per-dimension coordinate normalization.
Space-filling curves (Hilbert, Z-order) operate on equal-width
unsigned integer coordinates. This module maps each CoordValue
into a u64 in [0, 2^bits) relative to the dimension’s
[Domain]. The bit budget is shared across dims so the total prefix
fits in 64 bits.
Constants§
- MAX_
DIMS - Maximum dims supported by ND Hilbert in this implementation.
- PREFIX_
BITS - Total bit budget for the combined space-filling-curve prefix.
Functions§
- bits_
per_ dim - Bits per dim for an
n-dim schema, dividingPREFIX_BITSevenly (truncated). Returns at least 1 bit per dim. - normalize_
coord - Normalize one cell coordinate into per-dim integer coordinates in
[0, 2^bits). The outputVechas the same arity as the schema.