libheap

a general heap library


Keywords
data-structures, heap, heapsort
License
MIT
Install
pip install libheap==0.5

Documentation

libheap

here is an implementation of a general min/max heap library, including trivial heap and indexed heap, which not only supports the usual push , pop, peek operations, but also heapification, key modification and self-defined comparator.
Indexheap is a significant heap structure which stores and sorts (index,key) pairs according to their key, it is essential in efficient implementation of Dijkstra's algorithm, Prim's algorithm and other variants.
Meanwhile, it also includes implementation of Disjoint set(totally irrevalent, just attaching because I am bored).

Acknowledgement

this library is coded by reference to algs4. Much appreciation!

documentation to be completed

Installation(# outdated, just copy and paste python class directly)

method 1: pip install --user libheap
method 2: download this project, and run "python setup.py install"
only support python3