/** * Sanity check for operations requiring two matrices with the same number * of columns and rows. * * @throws IllegalArgumentException * if <tt>columns() != B.columns() || rows() != B.rows()</tt>. */ public void checkShape(AbstractMatrix2D B) { if (columns != B.columns || rows != B.rows) throw new IllegalArgumentException("Incompatible dimensions: " + toStringShort() + " and " + B.toStringShort()); }
/** * Sanity check for operations requiring two matrices with the same number * of columns and rows. * * @throws IllegalArgumentException * if <tt>columns() != B.columns() || rows() != B.rows()</tt>. */ public void checkShape(AbstractMatrix2D B) { if (columns != B.columns || rows != B.rows) throw new IllegalArgumentException("Incompatible dimensions: " + toStringShort() + " and " + B.toStringShort()); }
/** * Sanity check for operations requiring matrices with the same number of * columns and rows. * * @throws IllegalArgumentException * if * <tt>columns() != B.columns() || rows() != B.rows() || columns() != C.columns() || rows() != C.rows()</tt> * . */ public void checkShape(AbstractMatrix2D B, AbstractMatrix2D C) { if (columns != B.columns || rows != B.rows || columns != C.columns || rows != C.rows) throw new IllegalArgumentException("Incompatible dimensions: " + toStringShort() + ", " + B.toStringShort() + ", " + C.toStringShort()); }
/** * Sanity check for operations requiring matrices with the same number of * columns and rows. * * @throws IllegalArgumentException * if * <tt>columns() != B.columns() || rows() != B.rows() || columns() != C.columns() || rows() != C.rows()</tt> * . */ public void checkShape(AbstractMatrix2D B, AbstractMatrix2D C) { if (columns != B.columns || rows != B.rows || columns != C.columns || rows != C.rows) throw new IllegalArgumentException("Incompatible dimensions: " + toStringShort() + ", " + B.toStringShort() + ", " + C.toStringShort()); }
/** * Sanity check for operations requiring a column index to be within bounds. * * @throws IndexOutOfBoundsException * if <tt>column < 0 || column >= columns()</tt>. */ protected void checkColumn(int column) { if (column < 0 || column >= columns) throw new IndexOutOfBoundsException("Attempted to access " + toStringShort() + " at column=" + column); }
/** * Checks whether the receiver contains the given box and throws an * exception, if necessary. * * @throws IndexOutOfBoundsException * if * <tt>column<0 || width<0 || column+width>columns() || row<0 || height<0 || row+height>rows()</tt> */ protected void checkBox(int row, int column, int height, int width) { if (column < 0 || width < 0 || column + width > columns || row < 0 || height < 0 || row + height > rows) throw new IndexOutOfBoundsException(toStringShort() + ", column:" + column + ", row:" + row + " ,width:" + width + ", height:" + height); }
/** * Sanity check for operations requiring a row index to be within bounds. * * @throws IndexOutOfBoundsException * if <tt>row < 0 || row >= rows()</tt>. */ protected void checkRow(int row) { if (row < 0 || row >= rows) throw new IndexOutOfBoundsException("Attempted to access " + toStringShort() + " at row=" + row); }
/** * Checks whether the receiver contains the given box and throws an * exception, if necessary. * * @throws IndexOutOfBoundsException * if * <tt>column<0 || width<0 || column+width>columns() || row<0 || height<0 || row+height>rows()</tt> */ protected void checkBox(int row, int column, int height, int width) { if (column < 0 || width < 0 || column + width > columns || row < 0 || height < 0 || row + height > rows) throw new IndexOutOfBoundsException(toStringShort() + ", column:" + column + ", row:" + row + " ,width:" + width + ", height:" + height); }
/** * Sanity check for operations requiring a column index to be within bounds. * * @throws IndexOutOfBoundsException * if <tt>column < 0 || column >= columns()</tt>. */ protected void checkColumn(int column) { if (column < 0 || column >= columns) throw new IndexOutOfBoundsException("Attempted to access " + toStringShort() + " at column=" + column); }
/** * Sanity check for operations requiring a row index to be within bounds. * * @throws IndexOutOfBoundsException * if <tt>row < 0 || row >= rows()</tt>. */ protected void checkRow(int row) { if (row < 0 || row >= rows) throw new IndexOutOfBoundsException("Attempted to access " + toStringShort() + " at row=" + row); }