public final double doOperation() throws OperatorFailedException {
  int i=MathUtils.nextInt(parameterList.size());
  int j=i;
  while (j == i) {
    j=MathUtils.nextInt(parameterList.size());
  }
  final Parameter a=parameterList.get(i);
  final Parameter b=parameterList.get(j);
  Bounds<Double> aBounds=a.getBounds();
  Bounds<Double> bBounds=b.getBounds();
  for (int k=0; k < a.getDimension(); ++k) {
    final double ak=a.getParameterValue(k);
    final double bk=b.getParameterValue(k);
    if (isOutside(aBounds,bk,k) || isOutside(bBounds,ak,k)) {
      throw new OperatorFailedException("proposed value outside boundaries");
    }
    a.setParameterValueQuietly(k,bk);
    b.setParameterValueQuietly(k,ak);
  }
  a.fireParameterChangedEvent();
  b.fireParameterChangedEvent();
  return 0.0;
}

public final double doOperation ( ) throws OperatorFailedException { int i = MathUtils . nextInt ( parameterList . size ( ) ) ; int j = i ; while ( j == i ) { j = MathUtils . nextInt ( parameterList . size ( ) ) ; } final Parameter a = parameterList . get ( i ) ; final Parameter b = parameterList . get ( j ) ; Bounds < Double > aBounds = a . getBounds ( ) ; Bounds < Double > bBounds = b . getBounds ( ) ; for ( int k = 0 ; k < a . getDimension ( ) ; ++ k ) { final double ak = a . getParameterValue ( k ) ; final double bk = b . getParameterValue ( k ) ; if ( isOutside ( aBounds , bk , k ) || isOutside ( bBounds , ak , k ) ) { throw new OperatorFailedException ( "proposed value outside boundaries" ) ; } a . setParameterValueQuietly ( k , bk ) ; b . setParameterValueQuietly ( k , ak ) ; } a . fireParameterChangedEvent ( ) ; b . fireParameterChangedEvent ( ) ; return 0.0 ; }
swap all values in two random parameters .
