protected int selectOperator(){
  lastUpdate++;
  if ((lastUpdate >= UPDATE_WINDOW) || (probabilities == null)) {
    lastUpdate=0;
    probabilities=getOperatorProbabilities();
  }
  double rand=PRNG.nextDouble();
  double sum=0.0;
  for (int i=0; i < operators.size(); i++) {
    sum+=probabilities[i];
    if (sum > rand) {
      return i;
    }
  }
  throw new IllegalStateException();
}

protected int selectOperator ( ) { lastUpdate ++ ; if ( ( lastUpdate >= UPDATE_WINDOW ) || ( probabilities == null ) ) { lastUpdate = 0 ; probabilities = getOperatorProbabilities ( ) ; } double rand = PRNG . nextDouble ( ) ; double sum = 0.0 ; for ( int i = 0 ; i < operators . size ( ) ; i ++ ) { sum += probabilities [ i ] ; if ( sum > rand ) { return i ; } } throw new IllegalStateException ( ) ; }
returns the index of one of the available operators randomly selected using the probabilities .
