Documentation of 'Catalano.Core.ArraysUtil' Java class
ArraysUtil
Catalano.Core

Class ArraysUtil



  • public class ArraysUtil
    extends java.lang.Object
    Array Utilities.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static int[] Argsort(double[] array, boolean ascending)
      Returns the indices that would sort an array.
      static int[] Argsort(float[] array, boolean ascending)
      Returns the indices that would sort an array.
      static int[] Argsort(int[] array, boolean ascending)
      Returns the indices that would sort an array.
      static <T extends java.lang.Number>
      int[]
      asArray(T... array)
      Convert any number class to array of integer.
      static double[] Concatenate(double[] array, double[] array2)
      Concatenate the arrays.
      static float[] Concatenate(float[] array, float[] array2)
      Concatenate the arrays.
      static int[] Concatenate(int[] array, int[] array2)
      Concatenate the arrays.
      static double[] ConcatenateDouble(java.util.List<double[]> arrays)
      Concatenate all the arrays in the list into a vector.
      static float[] ConcatenateFloat(java.util.List<float[]> arrays)
      Concatenate all the arrays in the list into a vector.
      static int[] ConcatenateInt(java.util.List<int[]> arrays)
      Concatenate all the arrays in the list into a vector.
      static boolean Contains(int[] array, int element) 
      static void Shuffle(double[] array)
      Shuffle an array.
      static void Shuffle(double[] array, long seed)
      Shuffle an array.
      static void Shuffle(float[] array)
      Shuffle an array.
      static void Shuffle(float[] array, long seed)
      Shuffle an array.
      static void Shuffle(int[] array)
      Shuffle an array.
      static void Shuffle(int[] array, long seed)
      Shuffle an array.
      static <T> void Shuffle(T[] array)
      Shuffle an array.
      static <T> void Shuffle(T[] array, long seed)
      Shuffle an array.
      static double[] toDouble(float[] array)
      1-D Float array to double array.
      static double[][] toDouble(float[][] array)
      2-D Float array to double array.
      static double[] toDouble(int[] array)
      1-D Integer array to double array.
      static double[][] toDouble(int[][] array)
      2-D Integer array to double array.
      static double[] toDouble(java.util.List<java.lang.Double> ints)
      List of doubles to array.
      static float[] toFloat(double[] array)
      1-D Double array to float array.
      static float[][] toFloat(double[][] array)
      2-D Double array to float array.
      static float[] toFloat(int[] array)
      1-D Integer array to float array.
      static float[][] toFloat(int[][] array)
      2-D Integer array to float array.
      static float[] toFloat(java.util.List<java.lang.Float> ints)
      List of floats to array.
      static int[] toInt(double[] array)
      1-D Double array to integer array.
      static int[][] toInt(double[][] array)
      2-D Double array to integer array.
      static int[] toInt(float[] array)
      1-D Float array to integer array.
      static int[][] toInt(float[][] array)
      2-D Float array to integer array.
      static int[] toInt(java.util.List<java.lang.Integer> ints)
      List of integer to array.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • Argsort

        public static int[] Argsort(double[] array,
                                    boolean ascending)
        Returns the indices that would sort an array.
        Parameters:
        array - Array.
        ascending - Ascending order.
        Returns:
        Array of indices.
      • Argsort

        public static int[] Argsort(int[] array,
                                    boolean ascending)
        Returns the indices that would sort an array.
        Parameters:
        array - Array.
        ascending - Ascending order.
        Returns:
        Array of indices.
      • Argsort

        public static int[] Argsort(float[] array,
                                    boolean ascending)
        Returns the indices that would sort an array.
        Parameters:
        array - Array.
        ascending - Ascending order.
        Returns:
        Array of indices.
      • Contains

        public static boolean Contains(int[] array,
                                       int element)
      • Concatenate

        public static int[] Concatenate(int[] array,
                                        int[] array2)
        Concatenate the arrays.
        Parameters:
        array - First array.
        array2 - Second array.
        Returns:
        Concatenate between first and second array.
      • Concatenate

        public static double[] Concatenate(double[] array,
                                           double[] array2)
        Concatenate the arrays.
        Parameters:
        array - First array.
        array2 - Second array.
        Returns:
        Concatenate between first and second array.
      • Concatenate

        public static float[] Concatenate(float[] array,
                                          float[] array2)
        Concatenate the arrays.
        Parameters:
        array - First array.
        array2 - Second array.
        Returns:
        Concatenate between first and second array.
      • ConcatenateInt

        public static int[] ConcatenateInt(java.util.List<int[]> arrays)
        Concatenate all the arrays in the list into a vector.
        Parameters:
        arrays - List of arrays.
        Returns:
        Vector.
      • ConcatenateDouble

        public static double[] ConcatenateDouble(java.util.List<double[]> arrays)
        Concatenate all the arrays in the list into a vector.
        Parameters:
        arrays - List of arrays.
        Returns:
        Vector.
      • ConcatenateFloat

        public static float[] ConcatenateFloat(java.util.List<float[]> arrays)
        Concatenate all the arrays in the list into a vector.
        Parameters:
        arrays - List of arrays.
        Returns:
        Vector.
      • asArray

        public static <T extends java.lang.Number> int[] asArray(T... array)
        Convert any number class to array of integer.
        Type Parameters:
        T - Type.
        Parameters:
        array - Array.
        Returns:
        Integer array.
      • Shuffle

        public static void Shuffle(double[] array)
        Shuffle an array.
        Parameters:
        array - Array.
      • Shuffle

        public static void Shuffle(double[] array,
                                   long seed)
        Shuffle an array.
        Parameters:
        array - Array.
        seed - Random seed.
      • Shuffle

        public static void Shuffle(int[] array)
        Shuffle an array.
        Parameters:
        array - Array.
      • Shuffle

        public static void Shuffle(int[] array,
                                   long seed)
        Shuffle an array.
        Parameters:
        array - Array.
        seed - Seed of the random.
      • Shuffle

        public static void Shuffle(float[] array)
        Shuffle an array.
        Parameters:
        array - Array.
      • Shuffle

        public static void Shuffle(float[] array,
                                   long seed)
        Shuffle an array.
        Parameters:
        array - Array.
        seed - Random seed.
      • Shuffle

        public static <T> void Shuffle(T[] array)
        Shuffle an array.
        Parameters:
        array - Array.
      • Shuffle

        public static <T> void Shuffle(T[] array,
                                       long seed)
        Shuffle an array.
        Parameters:
        array - Array.
        seed - Random seed.
      • toFloat

        public static float[] toFloat(int[] array)
        1-D Integer array to float array.
        Parameters:
        array - Integer array.
        Returns:
        Float array.
      • toFloat

        public static float[][] toFloat(int[][] array)
        2-D Integer array to float array.
        Parameters:
        array - Integer array.
        Returns:
        Float array.
      • toFloat

        public static float[] toFloat(double[] array)
        1-D Double array to float array.
        Parameters:
        array - Double array.
        Returns:
        Float array.
      • toFloat

        public static float[][] toFloat(double[][] array)
        2-D Double array to float array.
        Parameters:
        array - Double array.
        Returns:
        Float array.
      • toFloat

        public static float[] toFloat(java.util.List<java.lang.Float> ints)
        List of floats to array.
        Parameters:
        ints - List of floats.
        Returns:
        Array float.
      • toInt

        public static int[] toInt(double[] array)
        1-D Double array to integer array.
        Parameters:
        array - Double array.
        Returns:
        Integer array.
      • toInt

        public static int[][] toInt(double[][] array)
        2-D Double array to integer array.
        Parameters:
        array - Double array.
        Returns:
        Integer array.
      • toInt

        public static int[] toInt(java.util.List<java.lang.Integer> ints)
        List of integer to array.
        Parameters:
        ints - List of integers.
        Returns:
        Array int.
      • toInt

        public static int[] toInt(float[] array)
        1-D Float array to integer array.
        Parameters:
        array - Float array.
        Returns:
        Integer array.
      • toInt

        public static int[][] toInt(float[][] array)
        2-D Float array to integer array.
        Parameters:
        array - Float array.
        Returns:
        Integer array.
      • toDouble

        public static double[] toDouble(int[] array)
        1-D Integer array to double array.
        Parameters:
        array - Integer array.
        Returns:
        Double array.
      • toDouble

        public static double[][] toDouble(int[][] array)
        2-D Integer array to double array.
        Parameters:
        array - Integer array.
        Returns:
        Double array.
      • toDouble

        public static double[] toDouble(float[] array)
        1-D Float array to double array.
        Parameters:
        array - Float array.
        Returns:
        Double array.
      • toDouble

        public static double[][] toDouble(float[][] array)
        2-D Float array to double array.
        Parameters:
        array - Float array.
        Returns:
        Double array.
      • toDouble

        public static double[] toDouble(java.util.List<java.lang.Double> ints)
        List of doubles to array.
        Parameters:
        ints - List of doubles.
        Returns:
        Array double.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.