specless.automaton.utils.MaxHeap

class specless.automaton.utils.MaxHeap[source]

Bases: MinHeap

A nice class-based interface to create a max heap, using the heapq library.

Methods

heappop

Pops the largest element from the max heap.

heappush

Pushes an element onto the max heap.

heappop()[source]

Pops the largest element from the max heap.

Returns:

The largest element from the max heap.

Return type:

Any

heappush(x)[source]

Pushes an element onto the max heap.

Parameters:

x (Any) – The element to be pushed onto the max heap.