MCPcopy Create free account
hub / github.com/LFYSec/MScan / resize

Method resize

src/test/resources/cha/MaxPQ.java:71–78  ·  view source on GitHub ↗
(int capacity)

Source from the content-addressed store, hash-verified

69
70 // resize the underlying array to have the given capacity
71 private void resize(int capacity) {
72// assert capacity > n;
73 int[] temp = new int[capacity];
74 for (int i = 1; i <= n; i++) {
75 temp[i] = pq[i];
76 }
77 pq = temp;
78 }
79
80
81 /**

Callers 2

insertMethod · 0.95
delMaxMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected