The MaxPQ represents a priority queue of generic keys. It supports the usual insert and delete-the-max operations, along with methods for peeking at the max key, testing if the priority queue is empty, and iterating through the keys.
(cap: usize)
| 44 | /// testing if the priority queue is empty, and iterating through |
| 45 | /// the keys. |
| 46 | pub fn new_max_pq(cap: usize) -> Self { |
| 47 | let comparator = Box::new(|a: &T, b: &T| a.lt(b)); |
| 48 | Self::new(cap, comparator) |
| 49 | } |
| 50 | |
| 51 | fn new(cap: usize, comparator: Comparator<T>) -> Self { |
| 52 | let mut pq = Self { |
nothing calls this directly
no outgoing calls
no test coverage detected