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

Method view

JSAT/src/jsat/utils/IntList.java:218–223  ·  view source on GitHub ↗

Creates and returns a view of the given int array that requires only a small object allocation. Changes to the list will be reflected in the array up to a point. If the modification would require increasing the capacity of the array, a new array will be allocated - at which point operations will no

(int[] array, int length)

Source from the content-addressed store, hash-verified

216 * point of requiring the allocation of a new array
217 */
218 public static IntList view(int[] array, int length)
219 {
220 if(length > array.length || length < 0)
221 throw new IllegalArgumentException("length must be non-negative and no more than the size of the array("+array.length+"), not " + length);
222 return new IntList(array, length);
223 }
224}

Callers 6

unmodifiableViewMethod · 0.95
fromMethod · 0.95
fromMethod · 0.95
getSelectedNumericalMethod · 0.95
finishAddingMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected