Documentation ¶
Overview ¶
Package Hilbert is designed to allow consumers to find the Hilbert distance on the Hilbert curve if given a 2 dimensional coordinate. This could be useful for hashing or constructing a Hilbert R-Tree. Algorithm taken from here:
http://en.wikipedia.org/wiki/Hilbert_curve
This expects coordinates in the range [0, 0] to [MaxInt32, MaxInt32]. Using negative values for x and y will have undefinied behavior.
Benchmarks: BenchmarkEncode-8 10000000 181 ns/op BenchmarkDecode-8 10000000 191 ns/op
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.