public static int findRow ( DenseMatrix64F m , double ... row ) { int cols = m . numCols ; if ( row . length != cols ) { throw new IllegalArgumentException ( "illegal column count" ) ; } double [ ] d = m . data ; int rows = m . numRows ; for ( int r = 0 ; r < rows ; r ++ ) { boolean eq = true ; for ( int c = 0 ; c < cols ; c ++ ) { if ( d [ cols * r + c ] != row [ c ] ) { eq = false ; break ; } } if ( eq ) { return r ; } } return - 1 ; }
Returns found row number or - 1 .