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. Inputs must be in the range 0 to 2^16-1, inclusive.
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.3.0.tar.gz
(29.7 kB
view details)
Built Distribution
File details
Details for the file cyhilbert-1.3.0.tar.gz
.
File metadata
- Download URL: cyhilbert-1.3.0.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea8988953727769cd1204db20b9c8e9941ed61575217eaf1fef3344e11ac5ca0 |
|
MD5 | 9d49aabd88dbbdc2c408fee318f5722b |
|
BLAKE2b-256 | 4c42812398c737914ea2650f80bba74e13b13b98065a372437fdc2ae83188caa |
File details
Details for the file cyhilbert-1.3.0-cp310-cp310-macosx_12_0_arm64.whl
.
File metadata
- Download URL: cyhilbert-1.3.0-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 12.4 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 | ce4460e9c9e33371ccfdf046b38a7a9b1485d1195db918336b1c85083e231010 |
|
MD5 | e62d30b75220d599e46b356a7e249483 |
|
BLAKE2b-256 | 51ec8e21b1507e2a8dcd9331d9c9a4a02b7a6f114b1931304cc34e22b3a8a823 |