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.0.tar.gz
(27.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyhilbert-1.2.0.tar.gz.
File metadata
- Download URL: cyhilbert-1.2.0.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50128579a97c32af557cde127d5571439c714c117886c2dc9df41e5fd856c11f
|
|
| MD5 |
989114af76932931a4bff3e20723c57e
|
|
| BLAKE2b-256 |
df48c2d4d5e2a2660d90f380ebdae404160d35e54e15e53f58414e6262b3cee3
|
File details
Details for the file cyhilbert-1.2.0-cp310-cp310-macosx_12_0_arm64.whl.
File metadata
- Download URL: cyhilbert-1.2.0-cp310-cp310-macosx_12_0_arm64.whl
- Upload date:
- Size: 11.5 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 |
ca8fda0692b94bd8a0d8e11dcb2a34f5b0de5548b925b745a37c75b20416a740
|
|
| MD5 |
f31c001daa2e11f6fac3c837f9e018e2
|
|
| BLAKE2b-256 |
42363acd098541bb961ceab675f7bb7ac9f78fd2e24f3292e26e3fc6849584dd
|