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

Method exch

src/common/priority_queue.rs:253–256  ·  view source on GitHub ↗
(&mut self, i: usize, j: usize)

Source from the content-addressed store, hash-verified

251 }
252
253 fn exch(&mut self, i: usize, j: usize) {
254 self.pq.swap(i, j);
255 self.qp.swap(self.pq[i] as usize, self.pq[j] as usize);
256 }
257}

Callers 3

dequeueMethod · 0.80
swimMethod · 0.80
sinkMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected