src/utils/matrix/AbstractMatrix.java
public void sliceAt(int startRow, int startColumn, int endRow, int endColumn) throws MatrixException {
        if (startRow < 0 || startColumn < 0 || endRow > getTotalRows() -1 || endColumn > getTotalColumns() - 1) {
            throw new MatrixException("Slice rows: " + startRow + " - " + endRow + " and slice columns: " + startColumn + " - " + endColumn + " do not match matrix dimensions: " + getTotalRows() + "x" + getTotalColumns());
        }
        else updateSliceDimensions(startRow, startColumn, endRow, endColumn);
    }
/**
     * Slices matrix.
     *
     * @param startRow start row of slice.
     * @param startColumn start column of slice.
     * @param endRow  end row of slice.
     * @param endColumn  end column of slice.
     * @throws MatrixException throws exception if slicing fails.
     */
Slices matrix.

@param startRow start row of slice.
@param startColumn start column of slice.
@param endRow  end row of slice.
@param endColumn  end column of slice.
@throws MatrixException throws exception if slicing fails.
Slices matrix . @param startRow start row of slice . @param startColumn start column of slice . @param endRow end row of slice . @param endColumn end column of slice . @throws MatrixException throws exception if slicing fails .
public void sliceAt(int startRow, int startColumn, int endRow, int endColumn) throws MatrixException {
        if (startRow < 0 || startColumn < 0 || endRow > getTotalRows() -1 || endColumn > getTotalColumns() - 1) {
            throw new MatrixException("Slice rows: " + startRow + " - " + endRow + " and slice columns: " + startColumn + " - " + endColumn + " do not match matrix dimensions: " + getTotalRows() + "x" + getTotalColumns());
        }
        else updateSliceDimensions(startRow, startColumn, endRow, endColumn);
    }
public void sliceAt ( int startRow , int startColumn , int endRow , int endColumn ) throws MatrixException { if ( startRow < 0 || startColumn < 0 || endRow > getTotalRows ( ) - 1 || endColumn > getTotalColumns ( ) - 1 ) { throw new MatrixException ( "Slice rows: " + startRow + " - " + endRow + " and slice columns: " + startColumn + " - " + endColumn + " do not match matrix dimensions: " + getTotalRows ( ) + "x" + getTotalColumns ( ) ) ; } else updateSliceDimensions ( startRow , startColumn , endRow , endColumn ) ; }
Slices matrix.
Slices matrix .