List of usage examples for org.apache.mahout.math Arrays trimToCapacity
public static boolean[] trimToCapacity(boolean[] array, int maxCapacity)
From source file:gov.vha.isaac.ochre.collections.uuidnidmap.UuidArrayList.java
License:Apache License
/** * Trims the capacity of the receiver to be the receiver's current size. * Releases any superfluous internal memory. An application can use this * operation to minimize the storage of the receiver. */// w w w.ja v a 2 s.c om @Override public void trimToSize() { elements = Arrays.trimToCapacity(elements, size() * 2 + 1); }
From source file:sh.isaac.api.collections.uuidnidmap.UuidArrayList.java
License:Apache License
/** * Trims the capacity of the receiver to be the receiver's current size. * Releases any superfluous internal memory. An application can use this * operation to minimize the storage of the receiver. */// www.j a v a2s. c om @Override public void trimToSize() { this.elements = Arrays.trimToCapacity(this.elements, size() * 2 + 1); }