[−][src]Function hilbert::transform::fast_hilbert::hilbert_index
pub fn hilbert_index(
hilbert_axes: &[u32],
bits: usize,
interleaver_option: Option<&Interleaver>
) -> BigUint
Given the axes (coordinates) of a point in N-Dimensional space,
find the 1-dimensional distance to that point along the Hilbert curve as a BigUint
.
The number of dimensions is the length of the hilbert_axes
array.
Note: This is the most caller-friendly transformation from N-space to Hilbert distance.
hilbertAxes
- Point in N-space.bits
- Depth of the Hilbert curve. If bits is one, this is the top-level Hilbert curve.interleaver_option
- Optional Interleaver that can be used to optimize the transformation. If only transforming a single point, this is counterproductive. If transforming many, it will speed things up.- Returns - The Hilbert distance (or index) as a
BigUint
.