Function lindel::hilbert_encode[][src]

pub fn hilbert_encode<Coordinate, const N: usize>(
    input: [Coordinate; N]
) -> <Coordinate as IdealKey<N>>::Key where
    Coordinate: IdealKey<N> + ToPrimitive + PrimInt + BitOrAssign + BitAndAssign + BitXorAssign,
    <Coordinate as IdealKey<N>>::Key: ValidKey<Coordinate> + BitXorAssign

A free function for creating the Hilbert Index of an array of primitive integers.

Examples:

assert_eq!(hilbert_encode([4u8, 5, 6]), 351);

Implemented as a thin wrapper around the hilbert_index method.