k3heap
k3heap is a binary min heap implemented with reference
k3heap is a component of pykit3 project: a python3 toolkit set.
In this module RefHeap is a binary min heap implemented with reference: a parent has two references to two children and a child has a parent reference to its parent.
RefHeap is not thread safe::
import k3heap
h = k3heap.RefHeap()
x = []
h.push(x)
h.push(x) # ValueError
h.push([]) # OK
Install
pip install k3heap
Synopsis
import k3heap
h = k3heap.RefHeap([5, 1, 4, 2, 3])
while h.size > 0:
print(h.pop())
Author
Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Copyright and License
The MIT License (MIT)
Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Metadata
Release files for k3heap 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| k3heap-0.1.10.tar.gz | 6.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| k3heap-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / k3heap-0.1.10.tar.gz
| Download URL | k3heap-0.1.10.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9eb2ea33eff5677e829c70eaccadceab727de771b62c6ef491b773462a6535ab
|
|
BLAKE2b-256 checksum How to use checksums |
b20f9807ec95b14db37e8211c32ba437c40b674d9fb048b435c3c58a9f116895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / k3heap-0.1.10-py3-none-any.whl
| Download URL | k3heap-0.1.10-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3e7a3a9ea6b0d61a072b2f261f11b4f1e5d6d0dec4e332b533b3c380bb160a1
|
|
BLAKE2b-256 checksum How to use checksums |
03136cf4f3ec2a96371a0293006eb0bdcbf157cf0bf1b3586145b19b68d34ad6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|