de.kumpe.hadooptimizer.impl
Class IdentityMutator<I>

java.lang.Object
  extended by de.kumpe.hadooptimizer.impl.IdentityMutator<I>
Type Parameters:
I - the individuals' type
All Implemented Interfaces:
EsWrappableMutator, Mutator<I>, Serializable

public final class IdentityMutator<I>
extends Object
implements Mutator<I>, EsWrappableMutator

The IdentityMutator effectively does nothing, it just passes the input-individual through.

Author:
Christian Kumpe
See Also:
Serialized Form

Constructor Summary
IdentityMutator()
           
 
Method Summary
 double getMinIncrement()
          Returns the minimal allowed increment.
 double[] mutate(double[] individual, double increment)
          Mutates the given individual with the specified increment.
 I mutate(I individual)
          Creates a mutant of the given individual.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdentityMutator

public IdentityMutator()
Method Detail

mutate

public I mutate(I individual)
Description copied from interface: Mutator
Creates a mutant of the given individual.

The general contract is to not modify the given individual, but return a mutated copy.

Specified by:
mutate in interface Mutator<I>
Parameters:
individual - the individual to mutate
Returns:
the mutant of the passed individual

mutate

public double[] mutate(double[] individual,
                       double increment)
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
increment - the increment for the mutation (mainly the standard deviation of a normal distributed random number)
Returns:
the mutant

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

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 Christian Kumpe. All Rights Reserved.