public boolean isInBounds ( int row , int col ) { return row >= 0 && col >= 0 && row < mat . getNumRows ( ) && col < mat . getNumCols ( ) ; }
Returns true of the specified matrix element is valid element inside this matrix .