[−][src]Function moore_hilbert::box_vertex
pub fn box_vertex(
bits_per_dimension: BitsPerDimensionType,
find_min: bool,
coord1: &mut [HilbertCoordinate],
coord2: &mut [HilbertCoordinate]
) -> usize
Determine the first or last vertex of a box to lie on a Hilbert curve
Arguments
bits_per_dimension
- Number of bits per coordinatefind_min
- Is the least vertex sought?coord1
- One corner of boxcoord2
- Opposite corner
Returns
coord1
and coord2
modified to refer to selected corner
value returned is log2 of size of largest power-of-two-aligned box that
contains the selected corner and no other corners
Assumptions
bits_per_dimension
<= (sizeof HilbertIndex
) * (bits_per_byte
)