|
Algorithm 1. Calculation of H value |
| Input: |
, a point in
|
|
|
m, the order of the Hilbert curve |
| Output: |
H, the coordinate of in , i.e., Hilbert code, H-code |
| 1: |
for each order in m |
| 2: |
Get which is made from the highest bit binary of each dimension of . |
| 3: |
Inquire to get the H-order corresponding to
|
| 4: |
Put H-order in the top digit of H; |
| 5: |
if the current order is not the last one |
| 6: |
Inquire to get the coordinate |
| 7: |
Transformation information of H-order |
| 8: |
Complete the coordinate transformation of the remainder binary code of
|
| 9: |
Reset residual value |
| 10: |
end if |
| 11: |
end for |
| 12: |
return H |