src/miscelania.cpp
// check if nay of the branches is negative: find neg entry in a vector
check if nay of the branches is negative: find neg entry in a vector
check if nay of the branches is negative : find neg entry in a vector
int find_negative(std::vector<double> &v) {
  unsigned int i;
  for(i=0; i < v.size(); i++) {
    if(std::isnan(v[i])) {
            break;
    }
  }
  if(i == v.size()){
    return 0;
  }
  else {
    return 1;
  }
}
int find_negative ( std :: vector < double > & v ) { unsigned int i ; for ( i = 0 ; i < v . size ( ) ; i ++ ) { if ( std :: isnan ( v [ i ] ) ) { break ; } } if ( i == v . size ( ) ) { return 0 ; } else { return 1 ; } }
check if nay of the branches is negative: find neg entry in a vector
check if nay of the branches is negative : find neg entry in a vector
//std::cout << "S " << v[i] ;