A cythonized version of that one hilbert function you keep copy-pasting.
Project description
cyhilbert
A cythonized version of that one hilbert function you keep copy-pasting. See the original implementation of Hilbert curves in O(log(n)) time.
from cyhilbert import hilbert, DIMS, BITS_PER_DIM, MAX
DIMS #=> 2
BITS_PER_DIM #=> 16
MAX #=> 65535
hilbert(0, 0) #=> 0
hilbert(1, 0) #=> 1
hilbert(1, 1) #=> 2
hilbert(0, 1) #=> 3
hilbert(0, 2) #=> 4
hilbert(0, 3) #=> 5
hilbert(1, 3) #=> 6
hilbert(1, 2) #=> 7
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cyhilbert-1.0.0.tar.gz
(27.4 kB
view details)
Built Distribution
File details
Details for the file cyhilbert-1.0.0.tar.gz
.
File metadata
- Download URL: cyhilbert-1.0.0.tar.gz
- Upload date:
- Size: 27.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d634f0839f4ef07bad8013c00c14cf081e26c8469ef385ae18c4672b96014464 |
|
MD5 | cd842e375804dd36670408fcd3a76597 |
|
BLAKE2b-256 | 75f9cd90fba45370547d8bdeefa5508cfc8fdeb955541da7b694065ee5ab4d61 |
File details
Details for the file cyhilbert-1.0.0-cp310-cp310-macosx_12_0_arm64.whl
.
File metadata
- Download URL: cyhilbert-1.0.0-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 11.6 kB
- Tags: CPython 3.10, macOS 12.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b2cc57ce6acd1dfc52ea774d8ad80349dcd688575781219714273472cafeb99 |
|
MD5 | dfddec50d5cf4d4d8262cf4796db9cd7 |
|
BLAKE2b-256 | 31bedeeb294f6f914f7d1a4a4e69b31bd937c16fb53b450386f9e8f281b8d49e |