Skip to main content

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.1.0.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

cyhilbert-1.1.0-cp310-cp310-macosx_12_0_arm64.whl (10.9 kB view details)

Uploaded CPython 3.10 macOS 12.0+ ARM64

File details

Details for the file cyhilbert-1.1.0.tar.gz.

File metadata

  • Download URL: cyhilbert-1.1.0.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for cyhilbert-1.1.0.tar.gz
Algorithm Hash digest
SHA256 af800d54d3f5f016d31887ddbc02aaa37d59eb5bbc7a9047745b900f7cafe264
MD5 9a0c20c88bd918e6d5c6258613437ec8
BLAKE2b-256 33a2d15675d3d32267014979c5d28b25eee21b5350ca6612b2ff2afdb0fafb36

See more details on using hashes here.

File details

Details for the file cyhilbert-1.1.0-cp310-cp310-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for cyhilbert-1.1.0-cp310-cp310-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 46ad3861e1b3f80910d1fe217ad8fffa443a59febb84c57ae1d1e90b8e8cdd84
MD5 97ef49c62fa5bcd3ed5995e2d2b7dea3
BLAKE2b-256 7a672b41994c8b622929546843a25d5f876cb333464fa1e58c4342a2f9482488

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page