Skip to main content
. 2018 Sep 12;18(9):3064. doi: 10.3390/s18093064
Algorithm 1. Calculation of H value
Input: v, a point in RN
m, the order of the Hilbert curve
Output: H, the coordinate of v in R1, i.e., Hilbert code, H-code
1: for each order in m
2:   Get p which is made from the highest bit binary of each dimension of v.
3:   Inquire CN to get the H-order corresponding to p
4:   Put H-order in the top digit of H;
5:   if the current order is not the last one
6:    Inquire GN to get the coordinate
7:    Transformation information of H-order
8:    Complete the coordinate transformation of the remainder binary code of v
9:    Reset residual value
10:   end if
11: end for
12: return H