Documentation of 'org.encog.mathutil.matrices.MatrixMath' Java class
MatrixMath
org.encog.mathutil.matrices

Class MatrixMath



  • public final class MatrixMath
    extends java.lang.Object
    This class can perform many different mathematical operations on matrixes. The matrixes passed in will not be modified, rather a new matrix, with the operation performed, will be returned.
    • Method Detail

      • add

        public static Matrix add(Matrix a,
                                 Matrix b)
        Add two matrixes.
        Parameters:
        a - The first matrix to add.
        b - The second matrix to add.
        Returns:
        A new matrix of the two added.
      • copy

        public static void copy(Matrix source,
                                Matrix target)
        Copy from one matrix to another.
        Parameters:
        source - The source matrix for the copy.
        target - The target matrix for the copy.
      • deleteCol

        public static Matrix deleteCol(Matrix matrix,
                                       int deleted)
        Delete one column from the matrix. Does not actually touch the source matrix, rather a new matrix with the column deleted is returned.
        Parameters:
        matrix - The matrix.
        deleted - The column to delete.
        Returns:
        A matrix with the column deleted.
      • deleteRow

        public static Matrix deleteRow(Matrix matrix,
                                       int deleted)
        Delete a row from the matrix. Does not actually touch the matrix, rather returns a new matrix.
        Parameters:
        matrix - The matrix.
        deleted - Which row to delete.
        Returns:
        A new matrix with the specified row deleted.
      • divide

        public static Matrix divide(Matrix a,
                                    double b)
        Return a matrix with each cell divided by the specified value.
        Parameters:
        a - The matrix to divide.
        b - The value to divide by.
        Returns:
        A new matrix with the division performed.
      • dotProduct

        public static double dotProduct(Matrix a,
                                        Matrix b)
        Compute the dot product for the two matrixes. To compute the dot product, both
        Parameters:
        a - The first matrix.
        b - The second matrix.
        Returns:
        The dot product.
      • identity

        public static Matrix identity(int size)
        Return an identity matrix of the specified size.
        Parameters:
        size - The number of rows and columns to create. An identity matrix is always square.
        Returns:
        An identity matrix.
      • multiply

        public static Matrix multiply(Matrix a,
                                      double b)
        Return the result of multiplying every cell in the matrix by the specified value.
        Parameters:
        a - The first matrix.
        b - The second matrix.
        Returns:
        The result of the multiplication.
      • multiply

        public static Matrix multiply(Matrix a,
                                      Matrix b)
        Return the product of the first and second matrix.
        Parameters:
        a - The first matrix.
        b - The second matrix.
        Returns:
        The result of the multiplication.
      • subtract

        public static Matrix subtract(Matrix a,
                                      Matrix b)
        Return the results of subtracting one matrix from another.
        Parameters:
        a - The first matrix.
        b - The second matrix.
        Returns:
        The results of the subtraction.
      • transpose

        public static Matrix transpose(Matrix input)
        Return the transposition of a matrix.
        Parameters:
        input - The matrix to transpose.
        Returns:
        The matrix transposed.
      • vectorLength

        public static double vectorLength(Matrix input)
        Calculate the length of a vector.
        Parameters:
        input - The matrix to calculate the length of.
        Returns:
        Vector length.
      • determinant

        public static double determinant(Matrix m)
      • multiply

        public static double[] multiply(Matrix a,
                                        double[] d)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.