|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Fixed-size heap More...
#include <cc/Heap>
Public Member Functions | |
| Heap | allocate (long n) |
| Create a new heap holding up to n items. | |
| Heap (Dim<> dim) | |
| Create a new heap holding up to n items. | |
| bool | isFull () const |
| Heap is full. | |
| bool | isEmpty () const |
| Heap is empty. | |
| long | size () const |
| Maximum number of items storable. | |
| long | fill () const |
| Current number of items stored. | |
| void | push (const T &item) |
| Add new item to the heap. | |
| void | pop (Out< T > item) |
| Remove the top of the heap. | |
| T | pop () |
| Remove the top of the heap. | |
| const T & | top () |
| Get the top of the heap (i.e. | |
| void | deplete () |
| Remove all items. | |
Fixed-size heap
| T | Item type |
| Order | Sorting order |
Create a new heap holding up to n items.
| Heap allocate | ( | long | n | ) |
Create a new heap holding up to n items.
| bool isFull | ( | ) | const |
Heap is full.
| bool isEmpty | ( | ) | const |
Heap is empty.
| long size | ( | ) | const |
Maximum number of items storable.
| long fill | ( | ) | const |
Current number of items stored.
| void push | ( | const T & | item | ) |
Add new item to the heap.
| void pop | ( | Out< T > | item | ) |
Remove the top of the heap.
| T pop | ( | ) |
Remove the top of the heap.
| const T & top | ( | ) |
Get the top of the heap (i.e.
the minimum if Order is DefaultOrder)
| void deplete | ( | ) |
Remove all items.