Class SimpleMatrix

    • Constructor Detail

      • SimpleMatrix

        public SimpleMatrix​(int numRow,
                            int numCol)
        Creates a matrix of size numRow × numCol. Elements on the diagonal (j == i) are set to 1.
        Parameters:
        numRow - number of rows.
        numCol - number of columns.
      • SimpleMatrix

        public SimpleMatrix​(Matrix matrix)
        Creates a new matrix initialized to the same content than the given matrix.
        Parameters:
        matrix - the matrix to copy.
    • Method Detail

      • isIdentity

        public boolean isIdentity()
        Returns true if this matrix is an identity matrix.
        Specified by:
        isIdentity in interface Matrix