private void doMutation ( double probability , DoubleSolution solution ) { for ( int i = 0 ; i < solution . getNumberOfVariables ( ) ; i ++ ) { if ( randomGenerator . getRandomValue ( ) <= probability ) { Double value = solution . getLowerBound ( i ) + ( ( solution . getUpperBound ( i ) - solution . getLowerBound ( i ) ) * randomGenerator . getRandomValue ( ) ) ; solution . setVariableValue ( i , value ) ; } } }
Implements the mutation operation