MCPcopy Create free account
hub / github.com/douchuan/algorithm / new_min_pq

Method new_min_pq

src/common/priority_queue.rs:36–39  ·  view source on GitHub ↗

The MinPQ represents a priority queue of generic keys. It supports the usual insert and delete-the-minimum operations, along with methods for peeking at the minimum key, testing if the priority queue is empty, and iterating through the keys.

(cap: usize)

Source from the content-addressed store, hash-verified

34 /// testing if the priority queue is empty, and iterating through
35 /// the keys.
36 pub fn new_min_pq(cap: usize) -> Self {
37 let comparator = Box::new(|a: &T, b: &T| a.gt(b));
38 Self::new(cap, comparator)
39 }
40
41 /// The MaxPQ represents a priority queue of generic keys.
42 /// It supports the usual insert and delete-the-max

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected