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

Method contains

src/common/priority_queue.rs:160–162  ·  view source on GitHub ↗

Is i an index on this priority queue?

(&self, i: usize)

Source from the content-addressed store, hash-verified

158
159 /// Is i an index on this priority queue?
160 pub fn contains(&self, i: usize) -> bool {
161 self.qp[i] != -1
162 }
163
164 /// MinPQ: Returns an index associated with a minimum key
165 /// MaxPQ: Returns an index associated with a maximum key

Callers 2

enqueueMethod · 0.45
decrease_keyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected