Single-hash-table Trie
Project description
shtrie
Single-hash-table Trie
Usage
>>> import shtrie
>>> trie = shtrie.list_to_trie([("CAT", 100), ("RAT", 200), ("DOG", 300)])
>>> from shtrie import PAYLOAD_KEY, ROW_KEY, TERMINAL_KEY
>>> from shtrie import lookup
>>> val0 = lookup(trie, 0, 0, "C")
>>> val0[TERMINAL_KEY]
False
>>> val1 = lookup(trie, val0[ROW_KEY], 1, "A")
>>> val2 = lookup(trie, val1[ROW_KEY], 2, "T")
>>> val2
(0, True, 100)
>>> lookup(trie, 0, 0, "O")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shtrie-0.1.0.tar.gz
(6.2 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 shtrie-0.1.0.tar.gz.
File metadata
- Download URL: shtrie-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e50394e55426aba43db510429be8a38afc20de170c3599e8707316f0c787ed69
|
|
| MD5 |
23bb04b6da2c08d17db06ca7d0e46d6c
|
|
| BLAKE2b-256 |
7c7a07e9b6822774b40379324f4d60fb00cd5fc01ddfdd34fe2dd810097f98ff
|
File details
Details for the file shtrie-0.1.0-py3-none-any.whl.
File metadata
- Download URL: shtrie-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6de350fdbe532b589fbadc55c35ee7595641cc864178b8bca977b223a75ef4a
|
|
| MD5 |
c8b59f5a150c5403ea0968ac4b66bc3a
|
|
| BLAKE2b-256 |
f3ac18a0c8ca0cf00ad7e0f20e16725b39aeb23e44aad34b511be0b56e5f3f1c
|