de.kumpe.hadooptimizer.impl
Class GaussionMutatorBase

java.lang.Object
  extended by de.kumpe.hadooptimizer.impl.GaussionMutatorBase
All Implemented Interfaces:
EsWrappableMutator, NeedsRandomGenerator, Serializable
Direct Known Subclasses:
GaussianMutator

public abstract class GaussionMutatorBase
extends Object
implements EsWrappableMutator, NeedsRandomGenerator

Base class for Mutators based on gaussian random number.

Author:
Christian Kumpe
See Also:
Serialized Form

Field Summary
protected  org.apache.commons.math.random.RandomGenerator randomGenerator
           
protected  double standardDeviation
           
 
Constructor Summary
GaussionMutatorBase(double standardDeviation)
           
 
Method Summary
 double getMinIncrement()
          Returns the minimal allowed increment.
 double[] mutate(double[] individual, double standardDeviation)
          Mutates the given individual with the specified increment.
protected  double nextGaussian(double standardDeviation)
          Produces a normal distributed random number with the given standard deviation.
 void setRandomGenerator(org.apache.commons.math.random.RandomGenerator randomGenerator)
          Injects a RandomGenerator instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

randomGenerator

protected transient org.apache.commons.math.random.RandomGenerator randomGenerator

standardDeviation

protected final double standardDeviation
Constructor Detail

GaussionMutatorBase

public GaussionMutatorBase(double standardDeviation)
Method Detail

setRandomGenerator

public void setRandomGenerator(org.apache.commons.math.random.RandomGenerator randomGenerator)
Description copied from interface: NeedsRandomGenerator
Injects a RandomGenerator instance.

Specified by:
setRandomGenerator in interface NeedsRandomGenerator
Parameters:
randomGenerator - the new RandomGenerator instance

mutate

public double[] mutate(double[] individual,
                       double standardDeviation)
Description copied from interface: EsWrappableMutator
Mutates the given individual with the specified increment.

Specified by:
mutate in interface EsWrappableMutator
Parameters:
individual - the individual to mutate
standardDeviation - the increment for the mutation (mainly the standard deviation of a normal distributed random number)
Returns:
the mutant

nextGaussian

protected final double nextGaussian(double standardDeviation)
Produces a normal distributed random number with the given standard deviation.


getMinIncrement

public double getMinIncrement()
Description copied from interface: EsWrappableMutator
Returns the minimal allowed increment. In the evolution strategies automatic increment adaption the ist the increment's lower bound.

Specified by:
getMinIncrement in interface EsWrappableMutator
Returns:
the minimal allowed increment


Copyright © 2011 Christian Kumpe. All Rights Reserved.