src/utils/matrix/operation/TransposeMatrixOperation.java
public Matrix apply(Matrix first, Matrix result) throws MatrixException {
        this.first = first;
        this.result = result;
        applyMatrixOperation();
        if (first.getMask() != null) {
            result.setMask();
            Mask resultMask = result.getMask();
            int rows = first.getRows();
            int columns = first.getColumns();
            for (int row = 0; row < rows; row++) {
                for (int column = 0; column < columns; column++) {
                    if (first.hasMaskAt(row, column)) resultMask.setMask(column, row, true);
                }
            }
        }
        return result;
    }
/**
     * Applies operation.
     *
     * @param first first matrix.
     * @param result result matrix.
     * @return result matrix.
     * @throws MatrixException throws exception if matrix operation fails.
     */
Applies operation.

@param first first matrix.
@param result result matrix.
@return result matrix.
@throws MatrixException throws exception if matrix operation fails.
Applies operation . @param first first matrix . @param result result matrix . @return result matrix . @throws MatrixException throws exception if matrix operation fails .
public Matrix apply(Matrix first, Matrix result) throws MatrixException {
        this.first = first;
        this.result = result;
        applyMatrixOperation();
        if (first.getMask() != null) {
            result.setMask();
            Mask resultMask = result.getMask();
            int rows = first.getRows();
            int columns = first.getColumns();
            for (int row = 0; row < rows; row++) {
                for (int column = 0; column < columns; column++) {
                    if (first.hasMaskAt(row, column)) resultMask.setMask(column, row, true);
                }
            }
        }
        return result;
    }
public Matrix apply ( Matrix first , Matrix result ) throws MatrixException { this . first = first ; this . result = result ; applyMatrixOperation ( ) ; if ( first . getMask ( ) != null ) { result . setMask ( ) ; Mask resultMask = result . getMask ( ) ; int rows = first . getRows ( ) ; int columns = first . getColumns ( ) ; for ( int row = 0 ; row < rows ; row ++ ) { for ( int column = 0 ; column < columns ; column ++ ) { if ( first . hasMaskAt ( row , column ) ) resultMask . setMask ( column , row , true ) ; } } } return result ; }
Applies operation.
Applies operation .