Expand description
Heap-based priority queue with an explicit allocator.
ExPriorityQueue implements a binary heap whose ordering is determined
by a caller-supplied OrdContext<T>. Depending on whether the context
implements a min-ordering or a max-ordering, the queue acts as a min-heap
or a max-heap respectively.
§Complexity
| Operation | Complexity |
|---|---|
push | O(log n) amortised |
pop | O(log n) |
peek | O(1) |
push_slice | O(n) via rebuild |
rebuild | O(n) |
§Growth Policy
The initial capacity is 4; subsequent growth doubles the capacity.
Structs§
- ExPriority
Queue - A binary-heap priority queue backed by an explicit allocator.