MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / enlargeIfNeeded

Method enlargeIfNeeded

JSAT/src/jsat/utils/IntList.java:178–182  ·  view source on GitHub ↗
(int i)

Source from the content-addressed store, hash-verified

176 }
177
178 private void enlargeIfNeeded(int i)
179 {
180 while(end+i > array.length)
181 array = Arrays.copyOf(array, Math.max(array.length*2, 8));
182 }
183
184 /**
185 * Efficiently sorts this list of integers using {@link Arrays#sort(int[])

Callers 2

addMethod · 0.95
addAllMethod · 0.95

Calls 2

copyOfMethod · 0.80
maxMethod · 0.45

Tested by

no test coverage detected