Save This Page
Home » mahout-collections-1.0-src » org.apache.mahout.math » [javadoc | source]
org.apache.mahout.math
public final class: Arrays [javadoc | source]
java.lang.Object
   org.apache.mahout.math.Arrays
Array manipulations; complements java.util.Arrays.
Method from org.apache.mahout.math.Arrays Summary:
copyOf,   copyOf,   copyOf,   copyOf,   copyOf,   copyOf,   copyOf,   ensureCapacity,   ensureCapacity,   ensureCapacity,   ensureCapacity,   ensureCapacity,   ensureCapacity,   ensureCapacity,   ensureCapacity,   ensureCapacity,   toString,   toString,   toString,   toString,   toString,   toString,   toString,   toString,   toString,   trimToCapacity,   trimToCapacity,   trimToCapacity,   trimToCapacity,   trimToCapacity,   trimToCapacity,   trimToCapacity,   trimToCapacity,   trimToCapacity
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.mahout.math.Arrays Detail:
 public static byte[] copyOf(byte[] src,
    int length) 
 public static char[] copyOf(char[] src,
    int length) 
 public static short[] copyOf(short[] src,
    int length) 
 public static int[] copyOf(int[] src,
    int length) 
 public static float[] copyOf(float[] src,
    int length) 
 public static double[] copyOf(double[] src,
    int length) 
 public static long[] copyOf(long[] src,
    int length) 
 public static byte[] ensureCapacity(byte[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static char[] ensureCapacity(char[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static double[] ensureCapacity(double[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static float[] ensureCapacity(float[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static int[] ensureCapacity(int[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static long[] ensureCapacity(long[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static Object[] ensureCapacity(Object[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static short[] ensureCapacity(short[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static boolean[] ensureCapacity(boolean[] array,
    int minCapacity) 
    Ensures that a given array can hold up to minCapacity elements. Returns the identical array if it can hold at least the number of elements specified. Otherwise, returns a new array with increased capacity containing the same elements, ensuring that it can hold at least the number of elements specified by the minimum capacity argument.
 public static String toString(byte[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(char[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(double[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(float[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(int[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(long[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(Object[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(short[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static String toString(boolean[] array) 
    Returns a string representation of the specified array. The string representation consists of a list of the arrays's elements, enclosed in square brackets ("[]"). Adjacent elements are separated by the characters ", " (comma and space).
 public static byte[] trimToCapacity(byte[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static char[] trimToCapacity(char[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static double[] trimToCapacity(double[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static float[] trimToCapacity(float[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static int[] trimToCapacity(int[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static long[] trimToCapacity(long[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static Object[] trimToCapacity(Object[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static short[] trimToCapacity(short[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.

 public static boolean[] trimToCapacity(boolean[] array,
    int maxCapacity) 
    Ensures that the specified array cannot hold more than maxCapacity elements. An application can use this operation to minimize array storage.

    Returns the identical array if array.length <= maxCapacity. Otherwise, returns a new array with a length of maxCapacity containing the first maxCapacity elements of array.