What is the fast n-dimensional z-order curve algorithm?
Space Fill Curves are a way of filling a mesh with a line that preserves locality, i.e. two close points on a line are also 2 close points in space.
Is there any fast algorithm ( O(1)
) for mapping between an N-dimensional coordinate and an index on the corresponding N-dimensional space filling curve?
+3
source to share
2 answers
You need to match Nd point with interleaved binary format, which will always be O (n), then if you have 1d sorted array you need to do O (logM) binary search, where M is the number of points; you can use * HashMap <binary, index> * and change the logM binary search search to persistent search o (1).
0
source to share