Documentation of 'Catalano.Math.Matrix' Java class
Matrix
Catalano.Math

Class Matrix



  • public final class Matrix
    extends java.lang.Object
    Defines a set of methods that works on multidimensional arrays and vectors.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double[][] Abs(double[][] A)
      Elementwise absolute value.
      static float[][] Abs(float[][] A)
      Elementwise absolute value.
      static int[][] Abs(int[][] A)
      Elementwise absolute value.
      static void Add(double[][] A, double scalar)
      Adds scalar value in a matrix.
      static double[][] Add(double[][] A, double[][] B)
      Adds two matrices.
      static void Add(double[] A, double scalar)
      Adds scalar value in a vector.
      static double[] Add(double[] A, double[] B)
      Adds two vectors.
      static void Add(float[][] A, float scalar)
      Adds scalar value in a matrix.
      static float[][] Add(float[][] A, float[][] B)
      Adds two matrices.
      static void Add(float[] A, float scalar)
      Adds scalar value in a vector.
      static float[] Add(float[] A, float[] B)
      Adds two vectors.
      static void Add(int[][] A, int scalar)
      Adds scalar value in a matrix.
      static int[][] Add(int[][] A, int[][] B)
      Adds two matrices.
      static void Add(int[] A, int scalar)
      Adds scalar value in a vector.
      static int[] Add(int[] A, int[] B)
      Adds two vectors.
      static void Clear(double[] A)
      Set all elements in the vector equal 0.
      static void Clear(double[][] A)
      Set all elements in the vector equal 0.
      static void Clear(float[] A)
      Set all elements in the vector equal 0.
      static void Clear(float[][] A)
      Set all elements in the vector equal 0.
      static void Clear(int[] A)
      Set all elements in the vector equal 0.
      static void Clear(int[][] A)
      Set all elements in the vector equal 0.
      static double[][] Copy(double[][] A)
      Create a new copy.
      static float[][] Copy(float[][] A)
      Create a new copy.
      static int[][] Copy(int[][] A)
      Create a new copy.
      static double[] CreateMatrix1D(int size, double val)
      Create 1D Matrix.
      static float[] CreateMatrix1D(int size, float val)
      Create 1D Matrix.
      static int[] CreateMatrix1D(int size, int val)
      Create 1D Matrix.
      static double[][] CreateMatrix2D(int height, int width, double val)
      Create 2D Matrix.
      static float[][] CreateMatrix2D(int height, int width, float val)
      Create 2D Matrix.
      static int[][] CreateMatrix2D(int height, int width, int val)
      Create 2D Matrix.
      static double Determinant(double[][] A)
      Determinant of matrix.
      static double[] Diff(double[] A, int differences)
      Returns iterated differences.
      static float[] Diff(float[] A, int differences)
      Returns iterated differences.
      static int[] Diff(int[] A, int differences)
      Returns iterated differences.
      static void Divide(double[][] A, double scalar)
      Divides a matrix with a scalar value.
      static void Divide(float[][] A, float scalar)
      Divides a matrix with a scalar value.
      static void Divide(int[][] A, int scalar)
      Divides a matrix with a scalar value.
      static double[][] DotProduct(double[][] A, double[][] B)
      Dot product.
      static float[][] DotProduct(float[][] A, float[][] B)
      Dot product.
      static int[][] DotProduct(int[][] A, int[][] B)
      Dot product.
      static double[][] Exp(double[][] A)
      Elementwise Exp operation.
      static void Fill(double[][] A, double number)
      Fill a matrix with specified number.
      static void Fill(double[] A, double number)
      Fill a vector with specified number.
      static void Fill(float[][] A, float number)
      Fill a matrix with specified number.
      static void Fill(float[] A, float number)
      Fill a vector with specified number.
      static void Fill(int[][] A, int number)
      Fill a matrix with specified number.
      static void Fill(int[] A, int number)
      Fill a vector with specified number.
      static double[] getColumn(double[][] A, int n)
      Return a vector from a specified column in a matrix.
      static float[] getColumn(float[][] A, int n)
      Return a vector from a specified column in a matrix.
      static int[] getColumn(int[][] A, int n)
      Return a vector from a specified column in a matrix.
      static <T> T[] getColumn(T[][] A, int n)
      Return a vector from a specified column in a matrix.
      static double[][] getColumns(double[][] A, int[] indexes)
      Return a matrix from specified columns.
      static double[] getColumns(double[] A, int[] indexes) 
      static double[] getColumns(double[] A, int startIndex, int endIndex)
      Return a vector from specified range.
      static float[][] getColumns(float[][] A, int[] indexes)
      Return a matrix from specified columns.
      static float[] getColumns(float[] A, int[] indexes) 
      static float[] getColumns(float[] A, int startIndex, int endIndex)
      Return a vector from specified range.
      static int[][] getColumns(int[][] A, int[] indexes)
      Return a matrix from specified columns.
      static int[] getColumns(int[] A, int[] indexes) 
      static int[] getColumns(int[] A, int startIndex, int endIndex)
      Return a vector from specified range.
      static <T> T[][] getColumns(T[][] A, int[] indexes)
      Return a matrix from specified columns.
      static <T> T[] getColumns(T[] A, int[] indexes) 
      static <T> T[] getColumns(T[] A, int startIndex, int endIndex)
      Return a vector from specified range.
      static double[] getRow(double[][] A, int n)
      Return a vector from a specified row in a matrix.
      static float[] getRow(float[][] A, int n)
      Return a vector from a specified row in a matrix.
      static int[] getRow(int[][] A, int n)
      Return a vector from a specified row in a matrix.
      static double[][] getRows(double[][] A, int[] indexes)
      Return a matrix from a specified row indexes.
      static double[] getRows(double[] A, int[] indexes)
      Return an array from a specified row indexes.
      static float[][] getRows(float[][] A, int[] indexes)
      Return a matrix from a specified row indexes.
      static float[] getRows(float[] A, int[] indexes)
      Return an array from a specified row indexes.
      static int[][] getRows(int[][] A, int[] indexes)
      Return a matrix from a specified row indexes.
      static int[] getRows(int[] A, int[] indexes)
      Return an array from a specified row indexes.
      static <T> T[] getRows(T[] A, int[] indexes)
      Return an array from a specified row indexes.
      static double[][] Identity(int order)
      Gets the Identity matrix of the given size.
      static double[][] Identity(int m, int n)
      Gets the Identity matrix of the given size.
      static int[] Indices(int from, int to)
      Creates a index vector.
      static double InnerProduct(double[] A, double[] B)
      Inner product (dot or scalar) between two vectors A'*B.
      static float InnerProduct(float[] A, float[] B)
      Inner product (dot or scalar) between two vectors.
      static int InnerProduct(int[] A, int[] B)
      Inner product (dot or scalar) between two vectors.
      static double[][] InsertColumn(double[][] A, double[] B, int index)
      Insert a column.
      static float[][] InsertColumn(float[][] A, float[] B, int index)
      Insert a column.
      static int[][] InsertColumn(int[][] A, int[] B, int index)
      Insert a column.
      static byte[] InsertColumns(byte[] A, byte[] B, int index)
      Insert columns in the array.
      static double[][] InsertColumns(double[][] A, double[][] B, int index)
      Insert columns.
      static double[] InsertColumns(double[] A, double[] B, int index)
      Insert columns in the array.
      static float[][] InsertColumns(float[][] A, float[][] B, int index)
      Insert columns.
      static float[] InsertColumns(float[] A, float[] B, int index)
      Insert columns in the array.
      static int[][] InsertColumns(int[][] A, int[][] B, int index)
      Insert columns.
      static int[] InsertColumns(int[] A, int[] B, int index)
      Insert columns in the array.
      static java.lang.Object[] InsertColumns(java.lang.Object[] A, java.lang.Object[] B, int index)
      Insert columns in the array.
      static double[][] Inverse(double[][] A)
      Matrix inverse or pseudoinverse.
      static boolean isEqual(double[][] A, double[][] B)
      Check if the matrix A is the same of B.
      static boolean isEqual(float[][] A, float[][] B)
      Check if the matrix A is the same of B.
      static boolean isEqual(int[][] A, int[][] B)
      Check if the matrix A is the same of B.
      static boolean isNonNegative(double[][] A)
      Check if all values are positive.
      static boolean isNonNegative(float[][] A)
      Check if all values are positive.
      static boolean isNonNegative(int[][] A)
      Check if all values are positive.
      static boolean isSquare(double[][] A)
      Check if the matrix is square.
      static boolean isSquare(float[][] A)
      Check if the matrix is square.
      static boolean isSquare(int[][] A)
      Check if the matrix is square.
      static boolean isSymmetric(double[][] A)
      Check if the matrix is symmetric.
      static boolean isSymmetric(float[][] A)
      Check if the matrix is symmetric.
      static boolean isSymmetric(int[][] A)
      Check if the matrix is symmetric.
      static boolean isZero(double[] A)
      Check if the vector contains only 0 values.
      static boolean isZero(double[][] A)
      Check if the matrix contains only 0 values.
      static boolean isZero(float[] A)
      Check if the vector contains only 0 values.
      static boolean isZero(float[][] A)
      Check if the matrix contains only 0 values.
      static boolean isZero(int[] A)
      Check if the vector contains only 0 values.
      static boolean isZero(int[][] A)
      Check if the matrix contains only 0 values.
      static double[] Linspace(double min, double max, int points)
      Generate linearly spaced vector.
      static double[] Log(double[] A)
      Elementwise Log operation.
      static double[][] Log(double[][] A)
      Elementwise Log operation.
      static double Max(double[] matrix)
      Get the maximum value from array.
      static double Max(double[][] matrix)
      Get the maximum value from array.
      static float Max(float[] matrix)
      Get the maximum value from array.
      static float Max(float[][] matrix)
      Get the maximum value from array.
      static int Max(int[] matrix)
      Get the maximum value from array.
      static int Max(int[][] matrix)
      Get the maximum value from array.
      static int MaxIndex(double[] matrix)
      Get the index of maximum value from array.
      static IntPoint MaxIndex(double[][] matrix)
      Get the index of maximum value from array.
      static int MaxIndex(float[] matrix)
      Get the index of maximum value from array.
      static IntPoint MaxIndex(float[][] matrix)
      Get the index of maximum value from array.
      static int MaxIndex(int[] matrix)
      Get the index of maximum value from array.
      static IntPoint MaxIndex(int[][] matrix)
      Get the index of maximum value from array.
      static double Mean(double[][] matrix)
      Get the mean of the all elements in the matrix.
      static float Mean(float[][] matrix)
      Get the mean of the all elements in the matrix.
      static double Mean(int[][] matrix)
      Get the mean of the all elements in the matrix.
      static double[][] MemberwiseClone(double[][] data) 
      static float[][] MemberwiseClone(float[][] data) 
      static int[][] MemberwiseClone(int[][] data) 
      static double Min(double[] matrix)
      Get the minimum value from array.
      static double Min(double[][] matrix)
      Get the minimum value from array.
      static float Min(float[] matrix)
      Get the minimum value from array.
      static float Min(float[][] matrix)
      Get the minimum value from array.
      static int Min(int[] matrix)
      Get the minimum value from array.
      static int Min(int[][] matrix)
      Get the minimum value from array.
      static int MinIndex(double[] matrix)
      Get the index of minimum value from array.
      static IntPoint MinIndex(double[][] matrix)
      Get the index of minimum value from array.
      static int MinIndex(float[] matrix)
      Get the index of minimum value from array.
      static IntPoint MinIndex(float[][] matrix)
      Get the index of minimum value from array.
      static int MinIndex(int[] matrix)
      Get the index of minimum value from array.
      static IntPoint MinIndex(int[][] matrix)
      Get the index of minimum value from array.
      static double[] MinMax(double[][] matrix)
      Get the minimum and the maximum of the matrix.
      static float[] MinMax(float[][] matrix)
      Get the minimum and the maximum of the matrix.
      static int[] MinMax(int[][] matrix)
      Get the minimum and the maximum of the matrix.
      static double[][] Multiply(double[][] A, double value)
      Multiply a Matrix with scalar value.
      static double[][] Multiply(double[][] A, double[][] B)
      Multiply two matrices.
      static double[] Multiply(double[] A, double scalar)
      Multiply a vector by a scalar.
      static double[] Multiply(double[] A, double[][] B)
      Multiply A vector by a matrix B.
      static float[][] Multiply(float[][] A, float value)
      Multiply a Matrix with scalar value.
      static float[][] Multiply(float[][] A, float[][] B)
      Multiply two matrices.
      static float[] Multiply(float[] A, float scalar)
      Multiply a vector by a scalar.
      static float[] Multiply(float[] A, float[][] B)
      Multiply A vector by a matrix B.
      static int[][] Multiply(int[][] A, int value)
      Multiply a Matrix with scalar value.
      static int[][] Multiply(int[][] A, int[][] B)
      Multiply two matrices.
      static int[] Multiply(int[] A, int scalar)
      Multiply a vector by a scalar.
      static int[] Multiply(int[] A, int[][] B)
      Multiply A vector by a matrix B.
      static double[][] MultiplyByDiagonal(double[][] A, double[] B) 
      static double[][] MultiplyByTranspose(double[][] A)
      Multiply a Matrix with the transpose.
      static double[] MultiplyByTranspose(double[][] A, double[] B)
      Multiply a Matrix with the transpose of other.
      static double[][] MultiplyByTranspose(double[][] A, double[][] B)
      Multiply a Matrix with the transpose of other.
      static float[][] MultiplyByTranspose(float[][] A)
      Multiply a Matrix with the transpose.
      static float[] MultiplyByTranspose(float[][] A, float[] B)
      Multiply a Matrix with the transpose of other.
      static float[][] MultiplyByTranspose(float[][] A, float[][] B)
      Multiply a Matrix with the transpose of other.
      static int[][] MultiplyByTranspose(int[][] A)
      Multiply a Matrix with the transpose.
      static int[] MultiplyByTranspose(int[][] A, int[] B)
      Multiply a Matrix with the transpose of other.
      static int[][] MultiplyByTranspose(int[][] A, int[][] B)
      Multiply a Matrix with the transpose of other.
      static double Norm1(double[][] A)
      Calculate 1-norm of a matrix.
      static float Norm1(float[][] A)
      Calculate 1-norm of a matrix.
      static int Norm1(int[][] A)
      Calculate 1-norm of a matrix.
      static double Norm2(double[] A) 
      static double Norm2(double[][] A)
      Calculate 2-norm of a matrix.
      static double NormF(double[][] A)
      Calculate Frobenius norm of a matrix.
      static float NormF(float[][] A)
      Calculate Frobenius norm of a matrix.
      static double NormF(int[][] A)
      Calculate Frobenius norm of a matrix.
      static double NormP(double[] v, int p)
      Calculate P norm of a vector.
      static double[][] OuterProduct(double[] u)
      Outer Product.
      static double[][] OuterProduct(double[] u, double[] v)
      Outer Product.
      static float[][] OuterProduct(float[] u)
      Outer Product.
      static float[][] OuterProduct(float[] u, float[] v)
      Outer Product.
      static int[][] OuterProduct(int[] u)
      Outer Product.
      static int[][] OuterProduct(int[] u, int[] v)
      Outer Product.
      static double[][] PseudoInverse(double[][] A)
      Calculate the pseudo-inverse of the matrix.
      static int[] RandomPermutation(int n)
      Create a random permutation.
      static int Rank(double[][] A)
      Calculate the rank of the matrix.
      static int Rank(float[][] A)
      Calculate the rank of the matrix.
      static int Rank(int[][] A)
      Calculate the rank of the matrix.
      static double[][] RemoveColumn(double[][] A, int index)
      Remove column from the matrix.
      static double[] RemoveColumn(double[] A, int index)
      Remove column from the vector.
      static float[][] RemoveColumn(float[][] A, int index)
      Remove column from the matrix.
      static float[] RemoveColumn(float[] A, int index)
      Remove column from the vector.
      static int[][] RemoveColumn(int[][] A, int index)
      Remove column from the matrix.
      static int[] RemoveColumn(int[] A, int index)
      Remove column from the vector.
      static <T> T[] RemoveColumn(T[] A, int index)
      Remove column from the vector.
      static boolean[] RemoveColumns(boolean[] A, int[] index)
      Remove columns from the vector.
      static double[][] RemoveColumns(double[][] A, int[] index)
      Remove columns from the matrix.
      static double[] RemoveColumns(double[] A, int[] index)
      Remove columns from the vector.
      static double[] RemoveColumns(double[] A, java.util.List<java.lang.Integer> index)
      Remove columns from the vector.
      static float[][] RemoveColumns(float[][] A, int[] index)
      Remove columns from the matrix.
      static float[] RemoveColumns(float[] A, int[] index)
      Remove columns from the vector.
      static float[] RemoveColumns(float[] A, java.util.List<java.lang.Integer> index)
      Remove columns from the vector.
      static int[][] RemoveColumns(int[][] A, int[] index)
      Remove columns from the matrix.
      static int[] RemoveColumns(int[] A, int[] index)
      Remove columns from the vector.
      static int[] RemoveColumns(int[] A, java.util.List<java.lang.Integer> index)
      Remove columns from the vector.
      static <T> T[] RemoveColumns(T[] A, int[] index)
      Remove columns from the vector.
      static double[][] RemoveRow(double[][] A, int index)
      Remove a specified row from the matrix.
      static float[][] RemoveRow(float[][] A, int index)
      Remove a specified row from the matrix.
      static int[][] RemoveRow(int[][] A, int index)
      Remove a specified row from the matrix.
      static <T> T[][] RemoveRow(T[][] A, int index)
      Remove a specified row from the matrix.
      static double[][] RemoveRows(double[][] A, int[] index)
      Remove rows from the matrix.
      static float[][] RemoveRows(float[][] A, int[] index)
      Remove rows from the matrix.
      static int[][] RemoveRows(int[][] A, int[] index)
      Remove rows from the matrix.
      static double[] Reshape(double[][] A)
      Convert matrix to vector.
      static double[][] Reshape(double[] vector, int m, int n)
      Convert vector to matrix.
      static float[] Reshape(float[][] A)
      Convert matrix to vector.
      static float[][] Reshape(float[] vector, int m, int n)
      Convert vector to matrix.
      static int[] Reshape(int[][] A)
      Convert matrix to vector.
      static int[][] Reshape(int[] vector, int m, int n)
      Convert vector to matrix.
      static double[][] Submatrix(double[][] data, int[] rowIndexes)
      Get the submatrix from the matrix.
      static double[][] Submatrix(double[][] data, int[] rowIndexes, int startColumn, int endColumn)
      Get the submatrix from the matrix.
      static double[][] SubMatrix(double[][] data, int rows, int cols) 
      static double[][] Submatrix(double[][] data, int startRow, int endRow, int[] columnIndexes)
      Get the submatrix from the matrix.
      static double[][] Submatrix(double[][] data, int startRow, int endRow, int startColumn, int endColumn)
      Get the submatrix from the matrix.
      static double[] SubMatrix(double[] data, int first) 
      static double[] Submatrix(double[] data, int startRow, int endRow) 
      static float[][] Submatrix(float[][] data, int startRow, int endRow, int[] columnIndexes)
      Get the submatrix from the matrix.
      static float[][] Submatrix(float[][] data, int startRow, int endRow, int startColumn, int endColumn)
      Get the submatrix from the matrix.
      static int[][] Submatrix(int[][] data, int[] rowIndexes)
      Get the submatrix from the matrix.
      static int[][] Submatrix(int[][] data, int[] rowIndexes, int startColumn, int endColumn)
      Get the submatrix from the matrix.
      static int[][] Submatrix(int[][] data, int startRow, int endRow, int[] columnIndexes)
      Get the submatrix from the matrix.
      static int[][] Submatrix(int[][] data, int startRow, int endRow, int startColumn, int endColumn)
      Get the submatrix from the matrix.
      static int[] SubMatrix(int[] data, int first) 
      static int[] Submatrix(int[] data, int startRow, int endRow) 
      static void Subtract(double[][] A, double scalar)
      Subtract matrix with a scalar value.
      static double[][] Subtract(double[][] A, double[][] B)
      Subtracts two matrices.
      static void Subtract(double[] A, double scalar)
      Subtract vector with a scalar value.
      static double[] Subtract(double[] A, double[] B)
      Subtracts two vectors.
      static void Subtract(float[][] A, float scalar)
      Subtract matrix with a scalar value.
      static float[][] Subtract(float[][] A, float[][] B)
      Subtracts two matrices.
      static void Subtract(float[] A, float scalar)
      Subtract vector with a scalar value.
      static float[] Subtract(float[] A, float[] B)
      Subtracts two vectors.
      static void Subtract(int[][] A, int scalar)
      Subtract matrix with a scalar value.
      static int[][] Subtract(int[][] A, int[][] B)
      Subtracts two matrices.
      static void Subtract(int[] A, int scalar)
      Subtract vector with a scalar value.
      static int[] Subtract(int[] A, int[] B)
      Subtracts two vectors.
      static double Sum(double[][] A)
      Sum all the elements in the matrix.
      static float Sum(float[][] A)
      Sum all the elements in the matrix.
      static int Sum(int[][] A)
      Sum all the elements in the matrix.
      static double SumAbs(double[][] A)
      Sum absolute of all the elements in the matrix.
      static float SumAbs(float[][] A)
      Sum absolute of all the elements in the matrix.
      static int SumAbs(int[][] A)
      Sum absolute of all the elements in the matrix.
      static void SwapColumn(double[][] A, int a, int b)
      Swap column.
      static void SwapColumn(float[][] A, int a, int b)
      Swap column.
      static void SwapColumn(int[][] A, int a, int b)
      Swap column.
      static void SwapRow(double[][] A, int a, int b)
      Swap row.
      static void SwapRow(float[][] A, int a, int b)
      Swap row.
      static void SwapRow(int[][] A, int a, int b)
      Swap row.
      static double[] toDoubleArray(double[][] A)
      Convert Matrix to Vector.
      static double[] toDoubleArray(float[][] A)
      Convert Matrix to Vector.
      static double[] toDoubleArray(int[][] A)
      Convert Matrix to Vector.
      static double[][] toDoubleMatrix(java.util.List<double[]> list)
      Convert List of array to Matrix.
      static float[] toFloatArray(double[][] A)
      Convert Matrix to Vector.
      static float[] toFloatArray(float[][] A)
      Convert Matrix to Vector.
      static float[] toFloatArray(int[][] A)
      Convert Matrix to Vector.
      static float[][] toFloatMatrix(java.util.List<float[]> list)
      Convert List of array to Matrix.
      static int[] toIntArray(double[][] A)
      Convert Matrix to Vector.
      static int[] toIntArray(float[][] A)
      Convert Matrix to Vector.
      static int[] toIntArray(int[][] A)
      Convert Matrix to Vector.
      static int[][] toIntMatrix(java.util.List<int[]> list)
      Convert List of array to Matrix.
      static double Trace(double[][] A)
      Is defined to be the sum of the elements on the main diagonal.
      static float Trace(float[][] A)
      Is defined to be the sum of the elements on the main diagonal.
      static int Trace(int[][] A)
      Is defined to be the sum of the elements on the main diagonal.
      static double[][] Transpose(double[][] A)
      Gets the transpose of the matrix.
      static <E> E[][] Transpose(E[][] A)
      Gets the transpose of the matrix.
      static float[][] Transpose(float[][] A)
      Gets the transpose of the matrix.
      static int[][] Transpose(int[][] A)
      Gets the transpose of the matrix.
      static double[] UniformRandom(double min, double max, int size) 
      static double[] UniformRandom(double min, double max, int size, long seed) 
      static double[] UniformRandom(DoubleRange range, int size) 
      static double[] UniformRandom(java.util.List<DoubleRange> ranges) 
      static double[] UniformRandom(java.util.List<DoubleRange> ranges, long seed) 
      • Methods inherited from class java.lang.Object

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

      • Abs

        public static double[][] Abs(double[][] A)
        Elementwise absolute value.
        Parameters:
        A - Matrix.
        Returns:
        Elementwise absolute matrix.
      • Abs

        public static int[][] Abs(int[][] A)
        Elementwise absolute value.
        Parameters:
        A - Matrix.
        Returns:
        Elementwise absolute matrix.
      • Abs

        public static float[][] Abs(float[][] A)
        Elementwise absolute value.
        Parameters:
        A - Matrix.
        Returns:
        Elementwise absolute matrix.
      • CreateMatrix1D

        public static double[] CreateMatrix1D(int size,
                                              double val)
        Create 1D Matrix.
        Parameters:
        size - Size of the matrix.
        val - Initial value of all elements.
        Returns:
        Matrix.
      • CreateMatrix1D

        public static int[] CreateMatrix1D(int size,
                                           int val)
        Create 1D Matrix.
        Parameters:
        size - Size of the matrix.
        val - Initial value of all elements.
        Returns:
        Matrix.
      • CreateMatrix1D

        public static float[] CreateMatrix1D(int size,
                                             float val)
        Create 1D Matrix.
        Parameters:
        size - Size of the matrix.
        val - Initial value of all elements.
        Returns:
        Matrix.
      • CreateMatrix2D

        public static double[][] CreateMatrix2D(int height,
                                                int width,
                                                double val)
        Create 2D Matrix.
        Parameters:
        height - Height of the matrix.
        width - Width of the matrix.
        val - Initial value of all elements.
        Returns:
        Matrix.
      • CreateMatrix2D

        public static int[][] CreateMatrix2D(int height,
                                             int width,
                                             int val)
        Create 2D Matrix.
        Parameters:
        height - Height of the matrix.
        width - Width of the matrix.
        val - Initial value of all elements.
        Returns:
        Matrix.
      • CreateMatrix2D

        public static float[][] CreateMatrix2D(int height,
                                               int width,
                                               float val)
        Create 2D Matrix.
        Parameters:
        height - Height of the matrix.
        width - Width of the matrix.
        val - Initial value of all elements.
        Returns:
        Matrix.
      • Indices

        public static int[] Indices(int from,
                                    int to)
        Creates a index vector.
        Parameters:
        from - From.
        to - To.
        Returns:
        Matrix
      • InnerProduct

        public static double InnerProduct(double[] A,
                                          double[] B)
        Inner product (dot or scalar) between two vectors A'*B.
        Parameters:
        A - Vector A.
        B - Vector B.
        Returns:
        Dot product between A and B.
      • InnerProduct

        public static int InnerProduct(int[] A,
                                       int[] B)
        Inner product (dot or scalar) between two vectors.
        Parameters:
        A - Vector A.
        B - Vector B.
        Returns:
        Dot product between A and B.
      • InnerProduct

        public static float InnerProduct(float[] A,
                                         float[] B)
        Inner product (dot or scalar) between two vectors.
        Parameters:
        A - Vector A.
        B - Vector B.
        Returns:
        Dot product between A and B.
      • InsertColumns

        public static double[] InsertColumns(double[] A,
                                             double[] B,
                                             int index)
        Insert columns in the array.
        Parameters:
        A - Array.
        B - Array.
        index - Index.
        Returns:
        New array.
      • InsertColumns

        public static int[] InsertColumns(int[] A,
                                          int[] B,
                                          int index)
        Insert columns in the array.
        Parameters:
        A - Array.
        B - Array.
        index - Index.
        Returns:
        New array.
      • InsertColumns

        public static float[] InsertColumns(float[] A,
                                            float[] B,
                                            int index)
        Insert columns in the array.
        Parameters:
        A - Array.
        B - Array.
        index - Index.
        Returns:
        New array.
      • InsertColumns

        public static byte[] InsertColumns(byte[] A,
                                           byte[] B,
                                           int index)
        Insert columns in the array.
        Parameters:
        A - Array.
        B - Array.
        index - Index.
        Returns:
        New array.
      • InsertColumns

        public static java.lang.Object[] InsertColumns(java.lang.Object[] A,
                                                       java.lang.Object[] B,
                                                       int index)
        Insert columns in the array.
        Parameters:
        A - Array.
        B - Array.
        index - Index.
        Returns:
        New array.
      • InsertColumn

        public static double[][] InsertColumn(double[][] A,
                                              double[] B,
                                              int index)
        Insert a column. Insert a column in the selected index.
        Parameters:
        A - Matrix.
        B - Column.
        index - Index.
      • InsertColumn

        public static int[][] InsertColumn(int[][] A,
                                           int[] B,
                                           int index)
        Insert a column. Insert a column in the selected index.
        Parameters:
        A - Matrix.
        B - Column.
        index - Index.
      • InsertColumn

        public static float[][] InsertColumn(float[][] A,
                                             float[] B,
                                             int index)
        Insert a column. Insert a column in the selected index.
        Parameters:
        A - Matrix.
        B - Column.
        index - Index.
      • InsertColumns

        public static double[][] InsertColumns(double[][] A,
                                               double[][] B,
                                               int index)
        Insert columns. Insert columns in the selected index.
        Parameters:
        A - Matrix.
        B - Columns.
        index - Index.
      • InsertColumns

        public static int[][] InsertColumns(int[][] A,
                                            int[][] B,
                                            int index)
        Insert columns. Insert columns in the selected index.
        Parameters:
        A - Matrix.
        B - Columns.
        index - Index.
      • InsertColumns

        public static float[][] InsertColumns(float[][] A,
                                              float[][] B,
                                              int index)
        Insert columns. Insert columns in the selected index.
        Parameters:
        A - Matrix.
        B - Columns.
        index - Index.
      • Log

        public static double[] Log(double[] A)
        Elementwise Log operation.
        Parameters:
        A - Vector.
        Returns:
        Log(Vector).
      • Log

        public static double[][] Log(double[][] A)
        Elementwise Log operation.
        Parameters:
        A - Matrix.
        Returns:
        Log(Matrix).
      • Add

        public static double[] Add(double[] A,
                                   double[] B)
        Adds two vectors.
        Parameters:
        A - Vector.
        B - Vector.
        Returns:
        The sum of the given vectors.
      • Add

        public static int[] Add(int[] A,
                                int[] B)
        Adds two vectors.
        Parameters:
        A - Vector.
        B - Vector.
        Returns:
        The sum of the given vectors.
      • Add

        public static float[] Add(float[] A,
                                  float[] B)
        Adds two vectors.
        Parameters:
        A - Vector.
        B - Vector.
        Returns:
        The sum of the given vectors.
      • Add

        public static double[][] Add(double[][] A,
                                     double[][] B)
        Adds two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The sum of the given matrices.
      • Add

        public static int[][] Add(int[][] A,
                                  int[][] B)
        Adds two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The sum of the given matrices.
      • Add

        public static float[][] Add(float[][] A,
                                    float[][] B)
        Adds two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The sum of the given matrices.
      • Add

        public static void Add(double[] A,
                               double scalar)
        Adds scalar value in a vector.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Add

        public static void Add(int[] A,
                               int scalar)
        Adds scalar value in a vector.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Add

        public static void Add(float[] A,
                               float scalar)
        Adds scalar value in a vector.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Add

        public static void Add(double[][] A,
                               double scalar)
        Adds scalar value in a matrix.
        Parameters:
        A - Matrix.
        scalar - Scalar value.
      • Add

        public static void Add(int[][] A,
                               int scalar)
        Adds scalar value in a matrix.
        Parameters:
        A - Matrix.
        scalar - Scalar value.
      • Add

        public static void Add(float[][] A,
                               float scalar)
        Adds scalar value in a matrix.
        Parameters:
        A - Matrix.
        scalar - Scalar value.
      • Clear

        public static void Clear(int[] A)
        Set all elements in the vector equal 0.
        Parameters:
        A - Vector.
      • Clear

        public static void Clear(float[] A)
        Set all elements in the vector equal 0.
        Parameters:
        A - Vector.
      • Clear

        public static void Clear(double[] A)
        Set all elements in the vector equal 0.
        Parameters:
        A - Vector.
      • Clear

        public static void Clear(int[][] A)
        Set all elements in the vector equal 0.
        Parameters:
        A - Matrix.
      • Clear

        public static void Clear(float[][] A)
        Set all elements in the vector equal 0.
        Parameters:
        A - Matrix.
      • Clear

        public static void Clear(double[][] A)
        Set all elements in the vector equal 0.
        Parameters:
        A - Matrix.
      • Copy

        public static double[][] Copy(double[][] A)
        Create a new copy.
        Parameters:
        A - Matrix to be copied.
        Returns:
        New matrix.
      • Copy

        public static int[][] Copy(int[][] A)
        Create a new copy.
        Parameters:
        A - Matrix to be copied.
        Returns:
        New matrix.
      • Copy

        public static float[][] Copy(float[][] A)
        Create a new copy.
        Parameters:
        A - Matrix to be copied.
        Returns:
        New matrix.
      • Determinant

        public static double Determinant(double[][] A)
        Determinant of matrix.
        Parameters:
        A - Matrix.
        Returns:
        Determinant of matrix.
      • Diff

        public static double[] Diff(double[] A,
                                    int differences)
        Returns iterated differences.
        Parameters:
        A - Vector.
        differences - Differences.
        Returns:
        Differences.
      • Diff

        public static int[] Diff(int[] A,
                                 int differences)
        Returns iterated differences.
        Parameters:
        A - Vector.
        differences - Differences.
        Returns:
        Differences.
      • Diff

        public static float[] Diff(float[] A,
                                   int differences)
        Returns iterated differences.
        Parameters:
        A - Vector.
        differences - Differences.
        Returns:
        Differences.
      • Divide

        public static void Divide(double[][] A,
                                  double scalar)
        Divides a matrix with a scalar value.
        Parameters:
        A - Matrix.
        scalar - Scalar value.
      • Exp

        public static double[][] Exp(double[][] A)
        Elementwise Exp operation.
        Parameters:
        A - Matrix.
        Returns:
        Exp(Matrix).
      • Divide

        public static void Divide(int[][] A,
                                  int scalar)
        Divides a matrix with a scalar value.
        Parameters:
        A - Matrix.
        scalar - Scalar value.
      • Divide

        public static void Divide(float[][] A,
                                  float scalar)
        Divides a matrix with a scalar value.
        Parameters:
        A - Matrix.
        scalar - Scalar value.
      • DotProduct

        public static double[][] DotProduct(double[][] A,
                                            double[][] B)
        Dot product.
        Parameters:
        A - Matrix.
        B - Matrix.
      • DotProduct

        public static int[][] DotProduct(int[][] A,
                                         int[][] B)
        Dot product.
        Parameters:
        A - Matrix.
        B - Matrix.
      • DotProduct

        public static float[][] DotProduct(float[][] A,
                                           float[][] B)
        Dot product.
        Parameters:
        A - Matrix.
        B - Matrix.
      • Fill

        public static void Fill(double[] A,
                                double number)
        Fill a vector with specified number.
        Parameters:
        A - Vector.
        number - Number.
      • getColumn

        public static double[] getColumn(double[][] A,
                                         int n)
        Return a vector from a specified column in a matrix.
        Parameters:
        A - Matrix.
        n - Number of column.
        Returns:
        Vector.
      • getColumn

        public static int[] getColumn(int[][] A,
                                      int n)
        Return a vector from a specified column in a matrix.
        Parameters:
        A - Matrix.
        n - Number of column.
        Returns:
        Vector.
      • getColumn

        public static float[] getColumn(float[][] A,
                                        int n)
        Return a vector from a specified column in a matrix.
        Parameters:
        A - Matrix.
        n - Index of column.
        Returns:
        Vector.
      • getColumn

        public static <T> T[] getColumn(T[][] A,
                                        int n)
        Return a vector from a specified column in a matrix.
        Type Parameters:
        T - Type.
        Parameters:
        A - Matrix.
        n - Index of column.
        Returns:
        Vector.
      • getColumns

        public static double[] getColumns(double[] A,
                                          int[] indexes)
      • getColumns

        public static int[] getColumns(int[] A,
                                       int[] indexes)
      • getColumns

        public static float[] getColumns(float[] A,
                                         int[] indexes)
      • getColumns

        public static <T> T[] getColumns(T[] A,
                                         int[] indexes)
      • getColumns

        public static double[] getColumns(double[] A,
                                          int startIndex,
                                          int endIndex)
        Return a vector from specified range.
        Parameters:
        A - Vector.
        startIndex - Start index.
        endIndex - End index.
        Returns:
        Vector.
      • getColumns

        public static int[] getColumns(int[] A,
                                       int startIndex,
                                       int endIndex)
        Return a vector from specified range.
        Parameters:
        A - Vector.
        startIndex - Start index.
        endIndex - End index.
        Returns:
        Vector.
      • getColumns

        public static float[] getColumns(float[] A,
                                         int startIndex,
                                         int endIndex)
        Return a vector from specified range.
        Parameters:
        A - Vector.
        startIndex - Start index.
        endIndex - End index.
        Returns:
        Vector.
      • getColumns

        public static <T> T[] getColumns(T[] A,
                                         int startIndex,
                                         int endIndex)
        Return a vector from specified range.
        Parameters:
        A - Vector.
        startIndex - Start index.
        endIndex - End index.
        Returns:
        Vector.
      • getColumns

        public static double[][] getColumns(double[][] A,
                                            int[] indexes)
        Return a matrix from specified columns.
        Parameters:
        A - Matrix.
        indexes - Indexes.
        Returns:
        Matrix.
      • getColumns

        public static int[][] getColumns(int[][] A,
                                         int[] indexes)
        Return a matrix from specified columns.
        Parameters:
        A - Matrix.
        indexes - Indexes.
        Returns:
        Matrix.
      • getColumns

        public static float[][] getColumns(float[][] A,
                                           int[] indexes)
        Return a matrix from specified columns.
        Parameters:
        A - Matrix.
        indexes - Indexes.
        Returns:
        Matrix.
      • getColumns

        public static <T> T[][] getColumns(T[][] A,
                                           int[] indexes)
        Return a matrix from specified columns.
        Type Parameters:
        T - Type.
        Parameters:
        A - Matrix.
        indexes - Indexes.
        Returns:
        Matrix.
      • getRow

        public static double[] getRow(double[][] A,
                                      int n)
        Return a vector from a specified row in a matrix.
        Parameters:
        A - Matrix.
        n - Number of row.
        Returns:
        Vector.
      • getRow

        public static int[] getRow(int[][] A,
                                   int n)
        Return a vector from a specified row in a matrix.
        Parameters:
        A - Matrix.
        n - Number of row.
        Returns:
        Vector.
      • getRow

        public static float[] getRow(float[][] A,
                                     int n)
        Return a vector from a specified row in a matrix.
        Parameters:
        A - Matrix.
        n - Number of row.
        Returns:
        Vector.
      • getRows

        public static double[][] getRows(double[][] A,
                                         int[] indexes)
        Return a matrix from a specified row indexes.
        Parameters:
        A - Matrix.
        indexes - Indexes.
        Returns:
        Matrix.
      • getRows

        public static int[][] getRows(int[][] A,
                                      int[] indexes)
        Return a matrix from a specified row indexes.
        Parameters:
        A - Matrix.
        indexes - Indexes.
        Returns:
        Matrix.
      • getRows

        public static float[][] getRows(float[][] A,
                                        int[] indexes)
        Return a matrix from a specified row indexes.
        Parameters:
        A - Matrix.
        indexes - Indexes.
        Returns:
        Matrix.
      • getRows

        public static double[] getRows(double[] A,
                                       int[] indexes)
        Return an array from a specified row indexes.
        Parameters:
        A - Array.
        indexes - Indexes.
        Returns:
        Array.
      • getRows

        public static int[] getRows(int[] A,
                                    int[] indexes)
        Return an array from a specified row indexes.
        Parameters:
        A - Array.
        indexes - Indexes.
        Returns:
        Array.
      • getRows

        public static float[] getRows(float[] A,
                                      int[] indexes)
        Return an array from a specified row indexes.
        Parameters:
        A - Array.
        indexes - Indexes.
        Returns:
        Array.
      • getRows

        public static <T> T[] getRows(T[] A,
                                      int[] indexes)
        Return an array from a specified row indexes.
        Type Parameters:
        T - User definied type.
        Parameters:
        A - Array.
        indexes - Indexes.
        Returns:
        Array.
      • Fill

        public static void Fill(int[] A,
                                int number)
        Fill a vector with specified number.
        Parameters:
        A - Vector.
        number - Number.
      • Fill

        public static void Fill(float[] A,
                                float number)
        Fill a vector with specified number.
        Parameters:
        A - Vector.
        number - Number.
      • Fill

        public static void Fill(double[][] A,
                                double number)
        Fill a matrix with specified number.
        Parameters:
        A - Vector.
        number - Number.
      • Fill

        public static void Fill(int[][] A,
                                int number)
        Fill a matrix with specified number.
        Parameters:
        A - Vector.
        number - Number.
      • Fill

        public static void Fill(float[][] A,
                                float number)
        Fill a matrix with specified number.
        Parameters:
        A - Vector.
        number - Number.
      • Subtract

        public static double[] Subtract(double[] A,
                                        double[] B)
        Subtracts two vectors.
        Parameters:
        A - Vector.
        B - Vector.
        Returns:
        The subtract of the given vectors.
      • Subtract

        public static int[] Subtract(int[] A,
                                     int[] B)
        Subtracts two vectors.
        Parameters:
        A - Vector.
        B - Vector.
        Returns:
        The subtract of the given vectors.
      • Subtract

        public static float[] Subtract(float[] A,
                                       float[] B)
        Subtracts two vectors.
        Parameters:
        A - Vector.
        B - Vector.
        Returns:
        The subtract of the given vectors.
      • Subtract

        public static double[][] Subtract(double[][] A,
                                          double[][] B)
        Subtracts two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The subtract of the given matrices.
      • Subtract

        public static int[][] Subtract(int[][] A,
                                       int[][] B)
        Subtracts two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The subtract of the given matrices.
      • Subtract

        public static float[][] Subtract(float[][] A,
                                         float[][] B)
        Subtracts two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The subtract of the given matrices.
      • Subtract

        public static void Subtract(double[] A,
                                    double scalar)
        Subtract vector with a scalar value.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Subtract

        public static void Subtract(int[] A,
                                    int scalar)
        Subtract vector with a scalar value.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Subtract

        public static void Subtract(float[] A,
                                    float scalar)
        Subtract vector with a scalar value.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Sum

        public static double Sum(double[][] A)
        Sum all the elements in the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Sum of the Matrix.
      • Sum

        public static int Sum(int[][] A)
        Sum all the elements in the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Sum of the Matrix.
      • Sum

        public static float Sum(float[][] A)
        Sum all the elements in the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Sum of the Matrix.
      • SumAbs

        public static double SumAbs(double[][] A)
        Sum absolute of all the elements in the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Sum of the Matrix.
      • SumAbs

        public static int SumAbs(int[][] A)
        Sum absolute of all the elements in the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Sum of the Matrix.
      • SumAbs

        public static float SumAbs(float[][] A)
        Sum absolute of all the elements in the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Sum of the Matrix.
      • Subtract

        public static void Subtract(double[][] A,
                                    double scalar)
        Subtract matrix with a scalar value.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Subtract

        public static void Subtract(int[][] A,
                                    int scalar)
        Subtract matrix with a scalar value.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • Subtract

        public static void Subtract(float[][] A,
                                    float scalar)
        Subtract matrix with a scalar value.
        Parameters:
        A - Vector.
        scalar - Scalar value.
      • SwapColumn

        public static void SwapColumn(double[][] A,
                                      int a,
                                      int b)
        Swap column.
        Parameters:
        A - Matrix.
        a - Origin index.
        b - Destiny index.
      • SwapColumn

        public static void SwapColumn(int[][] A,
                                      int a,
                                      int b)
        Swap column.
        Parameters:
        A - Matrix.
        a - Origin index.
        b - Destiny index.
      • SwapColumn

        public static void SwapColumn(float[][] A,
                                      int a,
                                      int b)
        Swap column.
        Parameters:
        A - Matrix.
        a - Origin index.
        b - Destiny index.
      • SwapRow

        public static void SwapRow(double[][] A,
                                   int a,
                                   int b)
        Swap row.
        Parameters:
        A - Matrix.
        a - Origin index.
        b - Destiny index.
      • SwapRow

        public static void SwapRow(int[][] A,
                                   int a,
                                   int b)
        Swap row.
        Parameters:
        A - Matrix.
        a - Origin index.
        b - Destiny index.
      • SwapRow

        public static void SwapRow(float[][] A,
                                   int a,
                                   int b)
        Swap row.
        Parameters:
        A - Matrix.
        a - Origin index.
        b - Destiny index.
      • Multiply

        public static double[] Multiply(double[] A,
                                        double scalar)
        Multiply a vector by a scalar.
        Parameters:
        A - Vector.
        scalar - Scalar.
        Returns:
        The multiply of the vector with the scalar.
      • Multiply

        public static int[] Multiply(int[] A,
                                     int scalar)
        Multiply a vector by a scalar.
        Parameters:
        A - Vector.
        scalar - Scalar.
        Returns:
        The multiply of the vector with the scalar.
      • Multiply

        public static float[] Multiply(float[] A,
                                       float scalar)
        Multiply a vector by a scalar.
        Parameters:
        A - Vector.
        scalar - Scalar.
        Returns:
        The multiply of the vector with the scalar.
      • Multiply

        public static double[][] Multiply(double[][] A,
                                          double[][] B)
        Multiply two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The multiply of the given matrices.
      • Multiply

        public static int[][] Multiply(int[][] A,
                                       int[][] B)
        Multiply two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The multiply of the given matrices.
      • Multiply

        public static double[] Multiply(double[] A,
                                        double[][] B)
        Multiply A vector by a matrix B.
        Parameters:
        A - Vector.
        B - Matrix.
        Returns:
        Result of the multiplication.
      • Multiply

        public static int[] Multiply(int[] A,
                                     int[][] B)
        Multiply A vector by a matrix B.
        Parameters:
        A - Vector.
        B - Matrix.
        Returns:
        Result of the multiplication.
      • Multiply

        public static float[] Multiply(float[] A,
                                       float[][] B)
        Multiply A vector by a matrix B.
        Parameters:
        A - Vector.
        B - Matrix.
        Returns:
        Result of the multiplication.
      • Multiply

        public static float[][] Multiply(float[][] A,
                                         float[][] B)
        Multiply two matrices.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        The multiply of the given matrices.
      • Multiply

        public static double[][] Multiply(double[][] A,
                                          double value)
        Multiply a Matrix with scalar value.
        Parameters:
        A - Matrix.
        value - Value.
        Returns:
        The multiply of the matrix with scalar value.
      • Multiply

        public static float[][] Multiply(float[][] A,
                                         float value)
        Multiply a Matrix with scalar value.
        Parameters:
        A - Matrix.
        value - Value.
        Returns:
        The multiply of the matrix with scalar value.
      • Multiply

        public static int[][] Multiply(int[][] A,
                                       int value)
        Multiply a Matrix with scalar value.
        Parameters:
        A - Matrix.
        value - Value.
        Returns:
        The multiply of the matrix with scalar value.
      • MultiplyByDiagonal

        public static double[][] MultiplyByDiagonal(double[][] A,
                                                    double[] B)
      • MultiplyByTranspose

        public static double[][] MultiplyByTranspose(double[][] A)
        Multiply a Matrix with the transpose. A * A'
        Parameters:
        A - Matrix.
        Returns:
        The multiply of the matrix with transpose of itself.
      • MultiplyByTranspose

        public static int[][] MultiplyByTranspose(int[][] A)
        Multiply a Matrix with the transpose. A * A'
        Parameters:
        A - Matrix.
        Returns:
        The multiply of the matrix with transpose of itself.
      • MultiplyByTranspose

        public static float[][] MultiplyByTranspose(float[][] A)
        Multiply a Matrix with the transpose. A * A'
        Parameters:
        A - Matrix.
        Returns:
        The multiply of the matrix with transpose of itself.
      • MultiplyByTranspose

        public static double[][] MultiplyByTranspose(double[][] A,
                                                     double[][] B)
        Multiply a Matrix with the transpose of other. A * B'
        Parameters:
        A - Matrix.
        B - Matrix to be transposed.
        Returns:
        The multiply of the matrix with transpose of the B.
      • MultiplyByTranspose

        public static int[][] MultiplyByTranspose(int[][] A,
                                                  int[][] B)
        Multiply a Matrix with the transpose of other. A * B'
        Parameters:
        A - Matrix.
        B - Matrix to be transposed.
        Returns:
        The multiply of the matrix with transpose of the B.
      • MultiplyByTranspose

        public static float[][] MultiplyByTranspose(float[][] A,
                                                    float[][] B)
        Multiply a Matrix with the transpose of other. A * B'
        Parameters:
        A - Matrix.
        B - Matrix to be transposed.
        Returns:
        The multiply of the matrix with transpose of the B.
      • MultiplyByTranspose

        public static double[] MultiplyByTranspose(double[][] A,
                                                   double[] B)
        Multiply a Matrix with the transpose of other. A * B'
        Parameters:
        A - Matrix.
        B - Vector.
        Returns:
        The multiply of the matrix with transpose of the B.
      • MultiplyByTranspose

        public static int[] MultiplyByTranspose(int[][] A,
                                                int[] B)
        Multiply a Matrix with the transpose of other. A * B'
        Parameters:
        A - Matrix.
        B - Vector.
        Returns:
        The multiply of the matrix with transpose of the B.
      • MultiplyByTranspose

        public static float[] MultiplyByTranspose(float[][] A,
                                                  float[] B)
        Multiply a Matrix with the transpose of other. A * B'
        Parameters:
        A - Matrix.
        B - Vector.
        Returns:
        The multiply of the matrix with transpose of the B.
      • Norm1

        public static double Norm1(double[][] A)
        Calculate 1-norm of a matrix.
        Parameters:
        A - Matrix.
        Returns:
        1-norm of a matrix.
      • Norm1

        public static int Norm1(int[][] A)
        Calculate 1-norm of a matrix.
        Parameters:
        A - Matrix.
        Returns:
        1-norm of a matrix.
      • Norm1

        public static float Norm1(float[][] A)
        Calculate 1-norm of a matrix.
        Parameters:
        A - Matrix.
        Returns:
        1-norm of a matrix.
      • Norm2

        public static double Norm2(double[] A)
      • Norm2

        public static double Norm2(double[][] A)
        Calculate 2-norm of a matrix.
        Parameters:
        A - Matrix.
        Returns:
        2-norm of a matrix.
      • NormF

        public static double NormF(double[][] A)
        Calculate Frobenius norm of a matrix.
        Parameters:
        A - Matrix.
        Returns:
        Frobenius norm.
      • NormF

        public static double NormF(int[][] A)
        Calculate Frobenius norm of a matrix.
        Parameters:
        A - Matrix.
        Returns:
        Frobenius norm.
      • NormF

        public static float NormF(float[][] A)
        Calculate Frobenius norm of a matrix.
        Parameters:
        A - Matrix.
        Returns:
        Frobenius norm.
      • NormP

        public static double NormP(double[] v,
                                   int p)
        Calculate P norm of a vector.
        Parameters:
        v - Vector.
        p - P must be an integer greater than 1.
        Returns:
        P norm.
      • OuterProduct

        public static double[][] OuterProduct(double[] u)
        Outer Product. Outer Product u x u is equivalent to a matrix multiplication uu^t.
        Parameters:
        u - Coordinate vector.
        Returns:
        Matrix.
      • OuterProduct

        public static double[][] OuterProduct(double[] u,
                                              double[] v)
        Outer Product. Outer Product u x v is equivalent to a matrix multiplication uv^t.
        Parameters:
        u - Coordinate vector.
        v - Coordinate vector.
        Returns:
        Matrix.
      • OuterProduct

        public static int[][] OuterProduct(int[] u)
        Outer Product. Outer Product u x u is equivalent to a matrix multiplication uu^t.
        Parameters:
        u - Coordinate vector.
        Returns:
        Matrix.
      • OuterProduct

        public static int[][] OuterProduct(int[] u,
                                           int[] v)
        Outer Product. Outer Product u x v is equivalent to a matrix multiplication uv^t.
        Parameters:
        u - Coordinate vector.
        v - Coordinate vector.
        Returns:
        Matrix.
      • OuterProduct

        public static float[][] OuterProduct(float[] u)
        Outer Product. Outer Product u x u is equivalent to a matrix multiplication uu^t.
        Parameters:
        u - Coordinate vector.
        Returns:
        Matrix.
      • OuterProduct

        public static float[][] OuterProduct(float[] u,
                                             float[] v)
        Outer Product. Outer Product u x v is equivalent to a matrix multiplication uv^t.
        Parameters:
        u - Coordinate vector.
        v - Coordinate vector.
        Returns:
        Matrix.
      • PseudoInverse

        public static double[][] PseudoInverse(double[][] A)
        Calculate the pseudo-inverse of the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Pseudo-inverse of the matrix.
      • Trace

        public static double Trace(double[][] A)
        Is defined to be the sum of the elements on the main diagonal.
        Parameters:
        A - Matrix NxN.
        Returns:
        Trace(A).
      • Trace

        public static int Trace(int[][] A)
        Is defined to be the sum of the elements on the main diagonal.
        Parameters:
        A - Matrix NxN.
        Returns:
        Trace(A).
      • Trace

        public static float Trace(float[][] A)
        Is defined to be the sum of the elements on the main diagonal.
        Parameters:
        A - Matrix NxN.
        Returns:
        Trace(A).
      • Transpose

        public static double[][] Transpose(double[][] A)
        Gets the transpose of the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Transposed matrix.
      • Transpose

        public static int[][] Transpose(int[][] A)
        Gets the transpose of the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Transposed matrix.
      • Transpose

        public static float[][] Transpose(float[][] A)
        Gets the transpose of the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Transposed matrix.
      • Transpose

        public static <E> E[][] Transpose(E[][] A)
        Gets the transpose of the matrix.
        Type Parameters:
        E - Object.
        Parameters:
        A - Matrix.
        Returns:
        Transposed matrix.
      • UniformRandom

        public static double[] UniformRandom(java.util.List<DoubleRange> ranges)
      • UniformRandom

        public static double[] UniformRandom(java.util.List<DoubleRange> ranges,
                                             long seed)
      • UniformRandom

        public static double[] UniformRandom(DoubleRange range,
                                             int size)
      • UniformRandom

        public static double[] UniformRandom(double min,
                                             double max,
                                             int size)
      • UniformRandom

        public static double[] UniformRandom(double min,
                                             double max,
                                             int size,
                                             long seed)
      • Identity

        public static double[][] Identity(int order)
        Gets the Identity matrix of the given size.
        Parameters:
        order - Size.
        Returns:
        Identity matrix.
      • Identity

        public static double[][] Identity(int m,
                                          int n)
        Gets the Identity matrix of the given size.
        Parameters:
        m - Number of rows.
        n - Number of columns.
        Returns:
        Identity matrix.
      • Inverse

        public static double[][] Inverse(double[][] A)
        Matrix inverse or pseudoinverse.
        Parameters:
        A - Matrix.
        Returns:
        Matrix inverse.
      • Linspace

        public static double[] Linspace(double min,
                                        double max,
                                        int points)
        Generate linearly spaced vector.
        Parameters:
        min - Minimum value.
        max - Maximum value.
        points - Points.
        Returns:
        Array.
      • Max

        public static double Max(double[][] matrix)
        Get the maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Maximum value.
      • Max

        public static double Max(double[] matrix)
        Get the maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Maximum value.
      • Max

        public static int Max(int[] matrix)
        Get the maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Maximum value.
      • Max

        public static float Max(float[] matrix)
        Get the maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Maximum value.
      • Max

        public static int Max(int[][] matrix)
        Get the maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Maximum value.
      • Max

        public static float Max(float[][] matrix)
        Get the maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Maximum value.
      • MaxIndex

        public static int MaxIndex(double[] matrix)
        Get the index of maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Index.
      • MaxIndex

        public static IntPoint MaxIndex(double[][] matrix)
        Get the index of maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Index.
      • MaxIndex

        public static int MaxIndex(int[] matrix)
        Get the index of maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Index.
      • MaxIndex

        public static IntPoint MaxIndex(int[][] matrix)
        Get the index of maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Index.
      • MaxIndex

        public static int MaxIndex(float[] matrix)
        Get the index of maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Index.
      • MaxIndex

        public static IntPoint MaxIndex(float[][] matrix)
        Get the index of maximum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Index.
      • Mean

        public static double Mean(double[][] matrix)
        Get the mean of the all elements in the matrix.
        Parameters:
        matrix - Matrix.
        Returns:
        Mean.
      • Mean

        public static double Mean(int[][] matrix)
        Get the mean of the all elements in the matrix.
        Parameters:
        matrix - Matrix.
        Returns:
        Mean.
      • Mean

        public static float Mean(float[][] matrix)
        Get the mean of the all elements in the matrix.
        Parameters:
        matrix - Matrix.
        Returns:
        Mean.
      • MemberwiseClone

        public static int[][] MemberwiseClone(int[][] data)
      • MemberwiseClone

        public static float[][] MemberwiseClone(float[][] data)
      • MemberwiseClone

        public static double[][] MemberwiseClone(double[][] data)
      • Min

        public static double Min(double[] matrix)
        Get the minimum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Minimum value.
      • Min

        public static double Min(double[][] matrix)
        Get the minimum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Minimum value.
      • Min

        public static int Min(int[] matrix)
        Get the minimum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Minimum value.
      • Min

        public static float Min(float[] matrix)
        Get the minimum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Minimum value.
      • Min

        public static int Min(int[][] matrix)
        Get the minimum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Minimum value.
      • Min

        public static float Min(float[][] matrix)
        Get the minimum value from array.
        Parameters:
        matrix - Array.
        Returns:
        Minimum value.
      • MinIndex

        public static int MinIndex(double[] matrix)
        Get the index of minimum value from array.
        Parameters:
        matrix - Matrix.
        Returns:
        Index.
      • MinIndex

        public static IntPoint MinIndex(double[][] matrix)
        Get the index of minimum value from array.
        Parameters:
        matrix - Matrix.
        Returns:
        Index.
      • MinMax

        public static double[] MinMax(double[][] matrix)
        Get the minimum and the maximum of the matrix.
        Parameters:
        matrix - Matrix.
        Returns:
        Min and maximum in the matrix.
      • MinMax

        public static int[] MinMax(int[][] matrix)
        Get the minimum and the maximum of the matrix.
        Parameters:
        matrix - Matrix.
        Returns:
        Min and maximum in the matrix.
      • MinMax

        public static float[] MinMax(float[][] matrix)
        Get the minimum and the maximum of the matrix.
        Parameters:
        matrix - Matrix.
        Returns:
        Min and maximum in the matrix.
      • MinIndex

        public static int MinIndex(int[] matrix)
        Get the index of minimum value from array.
        Parameters:
        matrix - Matrix.
        Returns:
        Index.
      • MinIndex

        public static IntPoint MinIndex(int[][] matrix)
        Get the index of minimum value from array.
        Parameters:
        matrix - Matrix.
        Returns:
        Index.
      • MinIndex

        public static int MinIndex(float[] matrix)
        Get the index of minimum value from array.
        Parameters:
        matrix - Matrix.
        Returns:
        Index.
      • MinIndex

        public static IntPoint MinIndex(float[][] matrix)
        Get the index of minimum value from array.
        Parameters:
        matrix - Matrix.
        Returns:
        Index.
      • isEqual

        public static boolean isEqual(double[][] A,
                                      double[][] B)
        Check if the matrix A is the same of B.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        True if is the same, otherwise false
      • isEqual

        public static boolean isEqual(int[][] A,
                                      int[][] B)
        Check if the matrix A is the same of B.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        True if is the same, otherwise false
      • isEqual

        public static boolean isEqual(float[][] A,
                                      float[][] B)
        Check if the matrix A is the same of B.
        Parameters:
        A - Matrix.
        B - Matrix.
        Returns:
        True if is the same, otherwise false
      • isNonNegative

        public static boolean isNonNegative(double[][] A)
        Check if all values are positive.
        Parameters:
        A - Matrix.
        Returns:
        True if all the values are positive.
      • isNonNegative

        public static boolean isNonNegative(int[][] A)
        Check if all values are positive.
        Parameters:
        A - Matrix.
        Returns:
        True if all the values are positive.
      • isNonNegative

        public static boolean isNonNegative(float[][] A)
        Check if all values are positive.
        Parameters:
        A - Matrix.
        Returns:
        True if all the values are positive.
      • isSquare

        public static boolean isSquare(double[][] A)
        Check if the matrix is square.
        Parameters:
        A - Matrix.
        Returns:
        Returns true if the matrix is square, otherwise returns false.
      • isSquare

        public static boolean isSquare(int[][] A)
        Check if the matrix is square.
        Parameters:
        A - Matrix.
        Returns:
        Returns true if the matrix is square, otherwise returns false.
      • isSquare

        public static boolean isSquare(float[][] A)
        Check if the matrix is square.
        Parameters:
        A - Matrix.
        Returns:
        Returns true if the matrix is square, otherwise returns false.
      • isSymmetric

        public static boolean isSymmetric(double[][] A)
        Check if the matrix is symmetric. A = A'
        Parameters:
        A - Matrix.
        Returns:
        True if is symmetric, otherwise return false.
      • isSymmetric

        public static boolean isSymmetric(int[][] A)
        Check if the matrix is symmetric. A = A'
        Parameters:
        A - Matrix.
        Returns:
        True if is symmetric, otherwise return false.
      • isSymmetric

        public static boolean isSymmetric(float[][] A)
        Check if the matrix is symmetric. A = A'
        Parameters:
        A - Matrix.
        Returns:
        True if is symmetric, otherwise return false.
      • isZero

        public static boolean isZero(int[] A)
        Check if the vector contains only 0 values.
        Parameters:
        A - Vector.
        Returns:
        True if the all elements is 0.
      • isZero

        public static boolean isZero(float[] A)
        Check if the vector contains only 0 values.
        Parameters:
        A - Vector.
        Returns:
        True if the all elements is 0.
      • isZero

        public static boolean isZero(double[] A)
        Check if the vector contains only 0 values.
        Parameters:
        A - Vector.
        Returns:
        True if the all elements is 0.
      • isZero

        public static boolean isZero(int[][] A)
        Check if the matrix contains only 0 values.
        Parameters:
        A - Matrix.
        Returns:
        True if the all elements is 0.
      • isZero

        public static boolean isZero(float[][] A)
        Check if the matrix contains only 0 values.
        Parameters:
        A - Matrix.
        Returns:
        True if the all elements is 0.
      • isZero

        public static boolean isZero(double[][] A)
        Check if the matrix contains only 0 values.
        Parameters:
        A - Matrix.
        Returns:
        True if the all elements is 0.
      • RandomPermutation

        public static int[] RandomPermutation(int n)
        Create a random permutation.
        Parameters:
        n - Number of elements.
        Returns:
        Random permutation.
      • Rank

        public static int Rank(double[][] A)
        Calculate the rank of the matrix.
        Parameters:
        A - matrix.
        Returns:
        Rank of the matrix.
      • Rank

        public static int Rank(int[][] A)
        Calculate the rank of the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Rank in the matrix.
      • Rank

        public static int Rank(float[][] A)
        Calculate the rank of the matrix.
        Parameters:
        A - Matrix.
        Returns:
        Rank in the matrix.
      • RemoveColumns

        public static int[][] RemoveColumns(int[][] A,
                                            int[] index)
        Remove columns from the matrix.
        Parameters:
        A - Matrix.
        index - Indexes.
        Returns:
        Matrix.
      • RemoveColumn

        public static double[][] RemoveColumn(double[][] A,
                                              int index)
        Remove column from the matrix.
        Parameters:
        A - Matrix.
        index - Index.
        Returns:
        Matrix.
      • RemoveColumn

        public static int[][] RemoveColumn(int[][] A,
                                           int index)
        Remove column from the matrix.
        Parameters:
        A - Matrix.
        index - Index.
        Returns:
        Matrix.
      • RemoveColumn

        public static float[][] RemoveColumn(float[][] A,
                                             int index)
        Remove column from the matrix.
        Parameters:
        A - Matrix.
        index - Index.
        Returns:
        Matrix.
      • RemoveColumns

        public static double[][] RemoveColumns(double[][] A,
                                               int[] index)
        Remove columns from the matrix.
        Parameters:
        A - Matrix.
        index - Indexes.
        Returns:
        Matrix.
      • RemoveColumns

        public static float[][] RemoveColumns(float[][] A,
                                              int[] index)
        Remove columns from the matrix.
        Parameters:
        A - Matrix.
        index - Indexes.
        Returns:
        Matrix.
      • RemoveColumn

        public static double[] RemoveColumn(double[] A,
                                            int index)
        Remove column from the vector.
        Parameters:
        A - Vector.
        index - Index.
        Returns:
        Vector.
      • RemoveColumn

        public static int[] RemoveColumn(int[] A,
                                         int index)
        Remove column from the vector.
        Parameters:
        A - Vector.
        index - Index.
        Returns:
        Vector.
      • RemoveColumn

        public static float[] RemoveColumn(float[] A,
                                           int index)
        Remove column from the vector.
        Parameters:
        A - Vector.
        index - Index.
        Returns:
        Vector.
      • RemoveColumn

        public static <T> T[] RemoveColumn(T[] A,
                                           int index)
        Remove column from the vector.
        Type Parameters:
        T - Type.
        Parameters:
        A - Vector.
        index - Index.
        Returns:
        Vector.
      • RemoveColumns

        public static double[] RemoveColumns(double[] A,
                                             int[] index)
        Remove columns from the vector.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveColumns

        public static int[] RemoveColumns(int[] A,
                                          int[] index)
        Remove columns from the vector.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveColumns

        public static float[] RemoveColumns(float[] A,
                                            int[] index)
        Remove columns from the vector.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveColumns

        public static double[] RemoveColumns(double[] A,
                                             java.util.List<java.lang.Integer> index)
        Remove columns from the vector.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveColumns

        public static int[] RemoveColumns(int[] A,
                                          java.util.List<java.lang.Integer> index)
        Remove columns from the vector.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveColumns

        public static float[] RemoveColumns(float[] A,
                                            java.util.List<java.lang.Integer> index)
        Remove columns from the vector.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveColumns

        public static boolean[] RemoveColumns(boolean[] A,
                                              int[] index)
        Remove columns from the vector.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveColumns

        public static <T> T[] RemoveColumns(T[] A,
                                            int[] index)
        Remove columns from the vector.
        Type Parameters:
        T - Type.
        Parameters:
        A - Vector.
        index - Array of index.
        Returns:
        Vector.
      • RemoveRow

        public static double[][] RemoveRow(double[][] A,
                                           int index)
        Remove a specified row from the matrix.
        Parameters:
        A - Matrix.
        index - Index.
        Returns:
        New matrix.
      • RemoveRow

        public static int[][] RemoveRow(int[][] A,
                                        int index)
        Remove a specified row from the matrix.
        Parameters:
        A - Matrix.
        index - Index.
        Returns:
        New matrix.
      • RemoveRow

        public static float[][] RemoveRow(float[][] A,
                                          int index)
        Remove a specified row from the matrix.
        Parameters:
        A - Matrix.
        index - Index.
        Returns:
        New matrix.
      • RemoveRow

        public static <T> T[][] RemoveRow(T[][] A,
                                          int index)
        Remove a specified row from the matrix.
        Parameters:
        A - Matrix.
        index - Index.
        Returns:
        New matrix.
      • RemoveRows

        public static int[][] RemoveRows(int[][] A,
                                         int[] index)
        Remove rows from the matrix.
        Parameters:
        A - Matrix.
        index - Indexes.
        Returns:
        Matrix.
      • RemoveRows

        public static double[][] RemoveRows(double[][] A,
                                            int[] index)
        Remove rows from the matrix.
        Parameters:
        A - Matrix.
        index - Indexes.
        Returns:
        Matrix.
      • RemoveRows

        public static float[][] RemoveRows(float[][] A,
                                           int[] index)
        Remove rows from the matrix.
        Parameters:
        A - Matrix.
        index - Indexes.
        Returns:
        Matrix.
      • Reshape

        public static double[][] Reshape(double[] vector,
                                         int m,
                                         int n)
        Convert vector to matrix.
        Parameters:
        vector - Vector.
        m - Size of rows.
        n - Size of cols.
        Returns:
        Matrix.
      • Reshape

        public static int[][] Reshape(int[] vector,
                                      int m,
                                      int n)
        Convert vector to matrix.
        Parameters:
        vector - Vector.
        m - Size of rows.
        n - Size of cols.
        Returns:
        Matrix.
      • Reshape

        public static float[][] Reshape(float[] vector,
                                        int m,
                                        int n)
        Convert vector to matrix.
        Parameters:
        vector - Vector.
        m - Size of rows.
        n - Size of cols.
        Returns:
        Matrix.
      • Reshape

        public static double[] Reshape(double[][] A)
        Convert matrix to vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • Reshape

        public static int[] Reshape(int[][] A)
        Convert matrix to vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • Reshape

        public static float[] Reshape(float[][] A)
        Convert matrix to vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • SubMatrix

        public static double[][] SubMatrix(double[][] data,
                                           int rows,
                                           int cols)
      • SubMatrix

        public static int[] SubMatrix(int[] data,
                                      int first)
      • SubMatrix

        public static double[] SubMatrix(double[] data,
                                         int first)
      • Submatrix

        public static int[] Submatrix(int[] data,
                                      int startRow,
                                      int endRow)
      • Submatrix

        public static double[] Submatrix(double[] data,
                                         int startRow,
                                         int endRow)
      • Submatrix

        public static double[][] Submatrix(double[][] data,
                                           int startRow,
                                           int endRow,
                                           int startColumn,
                                           int endColumn)
        Get the submatrix from the matrix.
        Parameters:
        data - Original data.
        startRow - Start row.
        endRow - End row.
        startColumn - Start Column.
        endColumn - End Column.
        Returns:
        Submatrix.
      • Submatrix

        public static int[][] Submatrix(int[][] data,
                                        int startRow,
                                        int endRow,
                                        int startColumn,
                                        int endColumn)
        Get the submatrix from the matrix.
        Parameters:
        data - Original data.
        startRow - Start row.
        endRow - End row.
        startColumn - Start Column.
        endColumn - End Column.
        Returns:
        Submatrix.
      • Submatrix

        public static float[][] Submatrix(float[][] data,
                                          int startRow,
                                          int endRow,
                                          int startColumn,
                                          int endColumn)
        Get the submatrix from the matrix.
        Parameters:
        data - Original data.
        startRow - Start row.
        endRow - End row.
        startColumn - Start Column.
        endColumn - End Column.
        Returns:
        Submatrix.
      • Submatrix

        public static double[][] Submatrix(double[][] data,
                                           int startRow,
                                           int endRow,
                                           int[] columnIndexes)
        Get the submatrix from the matrix.
        Parameters:
        data - Original data.
        startRow - Start row.
        endRow - End row.
        columnIndexes - Column indexes.
        Returns:
        Submatrix.
      • Submatrix

        public static int[][] Submatrix(int[][] data,
                                        int startRow,
                                        int endRow,
                                        int[] columnIndexes)
        Get the submatrix from the matrix.
        Parameters:
        data - Original data.
        startRow - Start row.
        endRow - End row.
        columnIndexes - Column indexes.
        Returns:
        Submatrix.
      • Submatrix

        public static float[][] Submatrix(float[][] data,
                                          int startRow,
                                          int endRow,
                                          int[] columnIndexes)
        Get the submatrix from the matrix.
        Parameters:
        data - Original data.
        startRow - Start row.
        endRow - End row.
        columnIndexes - Column indexes.
        Returns:
        Submatrix.
      • Submatrix

        public static int[][] Submatrix(int[][] data,
                                        int[] rowIndexes)
        Get the submatrix from the matrix.
        Parameters:
        data - Original matrix.
        rowIndexes - Row indexes.
        Returns:
        Submatrix.
      • Submatrix

        public static double[][] Submatrix(double[][] data,
                                           int[] rowIndexes)
        Get the submatrix from the matrix.
        Parameters:
        data - Original matrix.
        rowIndexes - Row indexes.
        Returns:
        Submatrix.
      • Submatrix

        public static int[][] Submatrix(int[][] data,
                                        int[] rowIndexes,
                                        int startColumn,
                                        int endColumn)
        Get the submatrix from the matrix.
        Parameters:
        data - Original matrix.
        rowIndexes - Row indexes.
        startColumn - Initial column index.
        endColumn - Final column index.
        Returns:
        Submatrix.
      • Submatrix

        public static double[][] Submatrix(double[][] data,
                                           int[] rowIndexes,
                                           int startColumn,
                                           int endColumn)
        Get the submatrix from the matrix.
        Parameters:
        data - Original matrix.
        rowIndexes - Row indexes.
        startColumn - Initial column index.
        endColumn - Final column index.
        Returns:
        Submatrix.
      • toDoubleArray

        public static double[] toDoubleArray(int[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toDoubleArray

        public static double[] toDoubleArray(double[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toDoubleArray

        public static double[] toDoubleArray(float[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toDoubleMatrix

        public static double[][] toDoubleMatrix(java.util.List<double[]> list)
        Convert List of array to Matrix.
        Parameters:
        list - List of array.
        Returns:
        Matrix.
      • toIntArray

        public static int[] toIntArray(int[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toIntArray

        public static int[] toIntArray(double[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toIntArray

        public static int[] toIntArray(float[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toIntMatrix

        public static int[][] toIntMatrix(java.util.List<int[]> list)
        Convert List of array to Matrix.
        Parameters:
        list - List of array.
        Returns:
        Matrix.
      • toFloatArray

        public static float[] toFloatArray(int[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toFloatArray

        public static float[] toFloatArray(double[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toFloatArray

        public static float[] toFloatArray(float[][] A)
        Convert Matrix to Vector.
        Parameters:
        A - Matrix.
        Returns:
        Vector.
      • toFloatMatrix

        public static float[][] toFloatMatrix(java.util.List<float[]> list)
        Convert List of array to Matrix.
        Parameters:
        list - List of array.
        Returns:
        Matrix.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.