Expand description
The Hilbert module contains these sub-modules:
- normalize - To prepare data for transformation.
- permutation - To reorder point coordinates as a means of generating alternate Hilbert curves.
- point_list - Prepare points from i32 or f64 data, deriving and applying a consistent transform to each.
- point - Represents an N-dimensional point suitable to be transformed and sorted by the Hilbert Curve.
- transform - Performs the core Hilbert Curve transform and its inverse.
Re-exports§
pub use self::normalize::IntegerDataRange;
pub use self::normalize::FloatDataRange;
pub use self::permutation::Permutation;
pub use self::point::Point;
pub use self::point_list::make_points_f64;
pub use self::point_list::make_points_i32;
pub use self::transform::fast_hilbert;
Modules§
- interleaver
- normalize
- The
normalize
module containsIntegerDataRange
andFloatDataRange
. These structs are used to normalize point coordinates to prepare them for the Hilbert transform. - permutation
- The
permutation
module contains thePermutation
struct, which is used to reorder the coordinates in one or morePoints
in a consistent way. This permits the generation of multiple Hilbert Curves, each rendering the points in a different order. With multiple curves, you can improve the accuracy of K-Nearest Nighbor searches and clustering algorithms. - point
- The
point
module defines thePoint
struct, which represents an N-dimensional point. ThesePoints
are suitable for the Hilbert Transformation, because they do not have negative values and the total number of bits required to represent each coordinate is controlled by the construction process. - point_
list - The
point_list
module can convert point-like data in forms defined by the caller intoPoint
structs. It defines the functionsmake_points_i32
andmake_points_f64
. They can detect the range of values in the input data and the number of bits required to code those values without losing precision, then translate and scale those values in the process of creatingPoints
.Points
created in this way are guaranteed to be acceptable to the Hilbert Curve transformation. - transform
- The
transform
module holds the functions which perform the forward and inverse Hilbert Transform. A more convenient way to prepare for and perform the forward transform is to createPoints
and callPoint::hilbert_transform
.