language agnostic - What is a fast n-dimensional Z-order curve algorithm? -


space filling curves way fill grid line preserves locality - is, 2 close points @ line 2 close points on space.

z-order-curve

is there fast (o(1)) algorithm map between n-dimensional coordinate , index on corresponding n-dimensional space-filling curve?

you need map n-d point interleaved binary format, going o(n), if have you're 1d sorted array have binary search o(logm) m number of points; use *hashmap < binary, index > * , change logm binary search lookup constant o(1) lookup.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -