Skip to main content

k3heap

Action-CI Documentation Status Package

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.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for k3heap 0.1.11
File Size Uploaded
k3heap-0.1.11.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for k3heap 0.1.11
File Interpreter ABI Platform
k3heap-0.1.11-py3-none-any.whl Python 3 none any Details

Total release size: 12.1 kB

Release files / k3heap-0.1.11.tar.gz

Download URL k3heap-0.1.11.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
030efe02dc69b24e7b9f0d8f0488a23a500394323d5979091bc3e24c822b92d0
BLAKE2b-256 checksum
How to use checksums
a830d26e3d6ca269929f5a6f079177f62dcc7538b2124f71ca6bcf3462668121
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / k3heap-0.1.11-py3-none-any.whl

Download URL k3heap-0.1.11-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c2699a3d4150f3c073a5473be96901e176a2158a00fa772f988b2dc72fc7cc5
BLAKE2b-256 checksum
How to use checksums
9dcc6037d04a6abf065f7898d6dd5ea2575006cd407a11a5c3cefba7e98e0d36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

0.1.14

2 release files

This release

0.1.11 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page