_pheap

Pairing heap with simple insert and pop-min operations.

Classes

_class PHeap(object)

Pairing heap with simple insert and pop-min operations.

_let x = PHeap(comp)

PHeap.__init__(comp)

Create a new pairing heap governed by the given comparator function.

_PHeap.__bool__()

_len(PHeap)

PHeap.__len__()

_PHeap.insert(value)

Insert a new element into the heap.

_PHeap.peek()

Retrieve the root (smallest) element of the heap, or None if it is empty.

_PHeap.pop()

Remove and return the root (smallest) element of the heap. If the heap is empty, IndexError is raised.

_PHeap.visit(func,after=False)

Call a function for each element of the heap.

_property PHeap.comp