src/utils/matrix/AbstractMatrix.java
public void copyMatrixData(Matrix newMatrix) throws MatrixException {
        if (getTotalRows() != newMatrix.getRows() || getTotalColumns() != newMatrix.getColumns()) throw new MatrixException("Size of this matrix " + getTotalRows() + "x" + getTotalColumns() + " is not matching with dimensions of new matrix + " + newMatrix.getRows() + " x " + newMatrix.getColumns());
        resetMatrix();
        int rows = getTotalRows();
        int columns = getTotalColumns();
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
                setValue(row, column, newMatrix.getValue(row, column));
            }
        }
    }
/**
     * Copies new matrix data into this matrix. Assumes equal dimensions for both matrices.
     *
     * @param newMatrix new matrix to be copied inside this matrix.
     * @throws MatrixException throws exception if this and new matrix dimensions are not matching.
     */
Copies new matrix data into this matrix. Assumes equal dimensions for both matrices.

@param newMatrix new matrix to be copied inside this matrix.
@throws MatrixException throws exception if this and new matrix dimensions are not matching.
Copies new matrix data into this matrix . Assumes equal dimensions for both matrices . @param newMatrix new matrix to be copied inside this matrix . @throws MatrixException throws exception if this and new matrix dimensions are not matching .
public void copyMatrixData(Matrix newMatrix) throws MatrixException {
        if (getTotalRows() != newMatrix.getRows() || getTotalColumns() != newMatrix.getColumns()) throw new MatrixException("Size of this matrix " + getTotalRows() + "x" + getTotalColumns() + " is not matching with dimensions of new matrix + " + newMatrix.getRows() + " x " + newMatrix.getColumns());
        resetMatrix();
        int rows = getTotalRows();
        int columns = getTotalColumns();
        for (int row = 0; row < rows; row++) {
            for (int column = 0; column < columns; column++) {
                setValue(row, column, newMatrix.getValue(row, column));
            }
        }
    }
public void copyMatrixData ( Matrix newMatrix ) throws MatrixException { if ( getTotalRows ( ) != newMatrix . getRows ( ) || getTotalColumns ( ) != newMatrix . getColumns ( ) ) throw new MatrixException ( "Size of this matrix " + getTotalRows ( ) + "x" + getTotalColumns ( ) + " is not matching with dimensions of new matrix + " + newMatrix . getRows ( ) + " x " + newMatrix . getColumns ( ) ) ; resetMatrix ( ) ; int rows = getTotalRows ( ) ; int columns = getTotalColumns ( ) ; for ( int row = 0 ; row < rows ; row ++ ) { for ( int column = 0 ; column < columns ; column ++ ) { setValue ( row , column , newMatrix . getValue ( row , column ) ) ; } } }
Copies new matrix data into this matrix.
Copies new matrix data into this matrix .