question: private boolean checkForNaNs ( NumberVector vec ) { for ( int i = 0 , d = vec . getDimensionality ( ) ; i < d ; i ++ ) { double v = vec . doubleValue ( i ) ; if ( v != v ) { return true ; } } return false ; }
target:  Check for NaN values.