|
The bliss C++ API 0.77 (Debian 0.77-3build1)
|
A min-heap of unsigned integers. More...
#include <heap.hh>
Public Member Functions | |
| bool | is_empty () const |
| void | clear () |
| void | insert (const unsigned int e) |
| unsigned int | smallest () const |
| unsigned int | remove () |
| size_t | size () const |
A min-heap of unsigned integers.
|
inline |
Remove all the elements in the heap. Time complexity is O(1).
Insert the element e in the heap. Time complexity is O(log(N)), where N is the number of elements currently in the heap.
|
inline |
Is the heap empty? Time complexity is O(1).
Remove and return the smallest element in the heap. Time complexity is O(log(N)), where N is the number of elements currently in the heap.
|
inline |
Get the number of elements in the heap.
Return the smallest element in the heap. Time complexity is O(1).