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

Method peek

src/common/priority_queue.rs:76–78  ·  view source on GitHub ↗

MinPQ: Returns a smallest key on this priority queue MaxPQ: Returns a largest key on this priority queue

(&self)

Source from the content-addressed store, hash-verified

74 /// MinPQ: Returns a smallest key on this priority queue
75 /// MaxPQ: Returns a largest key on this priority queue
76 pub fn peek(&self) -> Option<&T> {
77 self.pq.get(1)
78 }
79
80 /// Adds a new key to this priority queue
81 pub fn enqueue(&mut self, x: T) {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected