/** Returns a string representation of the receiver, containing the String representation of each element. */ public String toString() { return org.apache.mahout.math.Arrays.toString(partFromTo(0, size() - 1).elements()); } }
/** * Perform a merge sort on a range of a byte array using a specified ordering. * @param array the array. * @param start the first index. * @param end the last index (exclusive). * @param comp the comparator object. */ public static void mergeSort(byte[] array, int start, int end, ByteComparator comp) { checkBounds(array.length, start, end); byte[] out = Arrays.copyOf(array, array.length); mergeSort(out, array, start, end, comp); }
/** * Ensures that the receiver can hold at least the specified number of elements without needing to allocate new * internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver. * * @param minCapacity the desired minimum capacity. */ public void ensureCapacity(int minCapacity) { elements = org.apache.mahout.math.Arrays.ensureCapacity(elements, minCapacity); }
/** * 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. */ @Override public void trimToSize() { elements = org.apache.mahout.math.Arrays.trimToCapacity(elements, size()); } }
/** * 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. */ @Override public void trimToSize() { elements = org.apache.mahout.math.Arrays.trimToCapacity(elements, size()); } }
/** Returns a string representation of the receiver, containing the String representation of each element. */ public String toString() { return org.apache.mahout.math.Arrays.toString(partFromTo(0, size() - 1).elements()); } }
/** * Perform a merge sort on a range of a int array using numerical order. * @param array the array. * @param start the first index. * @param end the last index (exclusive). * @param comp the comparator object. */ public static void mergeSort(int[] array, int start, int end, IntComparator comp) { checkBounds(array.length, start, end); int[] out = Arrays.copyOf(array, array.length); mergeSort(out, array, start, end, comp); }
/** * Ensures that the receiver can hold at least the specified number of elements without needing to allocate new * internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver. * * @param minCapacity the desired minimum capacity. */ public void ensureCapacity(int minCapacity) { elements = org.apache.mahout.math.Arrays.ensureCapacity(elements, minCapacity); }
/** * 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. */ @Override public void trimToSize() { elements = org.apache.mahout.math.Arrays.trimToCapacity(elements, size()); } }
/** Returns a string representation of the receiver, containing the String representation of each element. */ public String toString() { return org.apache.mahout.math.Arrays.toString(partFromTo(0, size() - 1).elements()); } }
/** * Perform a merge sort on a range of a long array using a specified ordering. * @param array the array. * @param start the first index. * @param end the last index (exclusive). * @param comp the comparator object. */ public static void mergeSort(long[] array, int start, int end, LongComparator comp) { checkBounds(array.length, start, end); long[] out = Arrays.copyOf(array, array.length); mergeSort(out, array, start, end, comp); }
/** * Ensures that the receiver can hold at least the specified number of elements without needing to allocate new * internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver. * * @param minCapacity the desired minimum capacity. */ public void ensureCapacity(int minCapacity) { elements = org.apache.mahout.math.Arrays.ensureCapacity(elements, minCapacity); }
/** * 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. */ @Override public void trimToSize() { elements = org.apache.mahout.math.Arrays.trimToCapacity(elements, size()); } }
/** Returns a string representation of the receiver, containing the String representation of each element. */ public String toString() { return org.apache.mahout.math.Arrays.toString(partFromTo(0, size() - 1).elements()); } }
/** * Perform a merge sort on a range of a float array using a specified ordering. * @param array the array. * @param start the first index. * @param end the last index (exclusive). * @param comp the comparator object. */ public static void mergeSort(float[] array, int start, int end, FloatComparator comp) { checkBounds(array.length, start, end); float[] out = Arrays.copyOf(array, array.length); mergeSort(out, array, start, end, comp); }
/** * Ensures that the receiver can hold at least the specified number of elements without needing to allocate new * internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver. * * @param minCapacity the desired minimum capacity. */ public void ensureCapacity(int minCapacity) { elements = org.apache.mahout.math.Arrays.ensureCapacity(elements, minCapacity); }
/** * 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. */ @Override public void trimToSize() { elements = org.apache.mahout.math.Arrays.trimToCapacity(elements, size()); } }
/** Returns a string representation of the receiver, containing the String representation of each element. */ public String toString() { return org.apache.mahout.math.Arrays.toString(partFromTo(0, size() - 1).elements()); } }
/** * Perform a merge sort on a range of a double array using a specified ordering. * @param array the array. * @param start the first index. * @param end the last index (exclusive). * @param comp the comparator object. */ public static void mergeSort(double[] array, int start, int end, DoubleComparator comp) { checkBounds(array.length, start, end); double[] out = Arrays.copyOf(array, array.length); mergeSort(out, array, start, end, comp); }
/** * Ensures that the receiver can hold at least the specified number of elements without needing to allocate new * internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver. * * @param minCapacity the desired minimum capacity. */ public void ensureCapacity(int minCapacity) { elements = org.apache.mahout.math.Arrays.ensureCapacity(elements, minCapacity); }