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.2.1.tar.gz
(28.2 kB
view details)
Built Distribution
File details
Details for the file cyhilbert-1.2.1.tar.gz
.
File metadata
- Download URL: cyhilbert-1.2.1.tar.gz
- Upload date:
- Size: 28.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aedc7d3aae78b973effdaae54a9395120666ba730cb2b51c1823d1850086c623 |
|
MD5 | a29e8e51c96f133105ac35a1527c50dd |
|
BLAKE2b-256 | 5fac115ae10af56daf813ecc22f9bbcf618c2e20e478f34f843772292507f84a |
File details
Details for the file cyhilbert-1.2.1-cp310-cp310-macosx_12_0_arm64.whl
.
File metadata
- Download URL: cyhilbert-1.2.1-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 11.8 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 | b4b8f727221b8aea513309e5d52f9f5e736c677dd785da3465e50c354cc65959 |
|
MD5 | bee0f105e5a6e22e3f93ea8f1956b328 |
|
BLAKE2b-256 | df1bb8a17e4808be04ccbeaa55fe9fa458cd354b22d557aad7a32208756037ca |