ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
heapq Namespace Reference

Functions

None _siftdown (list[_Elem] heap, int startpos, int pos)
None _siftup (list[_Elem] heap, int pos)
None heapify (list[_Elem] heap)
None heappush (list[_Elem] heap, _Elem item)
_Elem heappop (list[_Elem] heap)
_Elem heapreplace (list[_Elem] heap, _Elem item)
_Elem heappushpop (list[_Elem] heap, _Elem item)

Variables

 _Elem = int

Function Documentation

◆ _siftdown()

None heapq._siftdown ( list[_Elem] heap,
int startpos,
int pos )
protected
Move heap[pos] toward startpos until its parent is no larger.

◆ _siftup()

None heapq._siftup ( list[_Elem] heap,
int pos )
protected
Bubble the smaller child up to heap[pos], then sift the oddball down.

◆ heapify()

None heapq.heapify ( list[_Elem] heap)
Transform the list into a heap, in-place.

◆ heappop()

_Elem heapq.heappop ( list[_Elem] heap)
Pop and return the smallest item, maintaining the heap invariant.

◆ heappush()

None heapq.heappush ( list[_Elem] heap,
_Elem item )
Push item onto the heap, maintaining the heap invariant.

◆ heappushpop()

_Elem heapq.heappushpop ( list[_Elem] heap,
_Elem item )
Push item on the heap, then pop and return the smallest item.

◆ heapreplace()

_Elem heapq.heapreplace ( list[_Elem] heap,
_Elem item )
Pop and return the smallest item, then push item; heap size is unchanged.

Variable Documentation

◆ _Elem

heapq._Elem = int
protected