JGAP

org.jgap.impl
Class GaussianMutationOperator

java.lang.Object
  extended by org.jgap.BaseGeneticOperator
      extended by org.jgap.impl.GaussianMutationOperator
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable, GeneticOperator

public class GaussianMutationOperator
extends BaseGeneticOperator

This genetic operator performs Gaussian mutation across all genes in a Chromosome.

Since:
2.0
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jgap.BaseGeneticOperator
m_monitor, m_monitorActive
 
Constructor Summary
GaussianMutationOperator()
          Constructs a GaussianMutationOperator with a default deviation of 0.05.
GaussianMutationOperator(Configuration a_config)
          Constructs a GaussianMutationOperator with a default deviation of 0.05.
GaussianMutationOperator(Configuration a_configuration, double a_deviation)
          Constructs a GaussianMutationOperator with the given deviation.
 
Method Summary
 int compareTo(java.lang.Object a_other)
          Compares the given GeneticOperator to this GeneticOperator.
 double getDeviation()
           
 void operate(Population a_population, java.util.List a_candidateChromosomes)
          Executes the operation.
 
Methods inherited from class org.jgap.BaseGeneticOperator
equals, getConfiguration
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GaussianMutationOperator

public GaussianMutationOperator()
                         throws InvalidConfigurationException
Constructs a GaussianMutationOperator with a default deviation of 0.05. Attention: The configuration used is the one set with the static method Genotype.setConfiguration.

Throws:
InvalidConfigurationException
Since:
2.0

GaussianMutationOperator

public GaussianMutationOperator(Configuration a_config)
                         throws InvalidConfigurationException
Constructs a GaussianMutationOperator with a default deviation of 0.05.

Parameters:
a_config - the configuration to use
Throws:
InvalidConfigurationException
Since:
3.0

GaussianMutationOperator

public GaussianMutationOperator(Configuration a_configuration,
                                double a_deviation)
                         throws InvalidConfigurationException
Constructs a GaussianMutationOperator with the given deviation.

Parameters:
a_configuration - the configuration to use
a_deviation - sic
Throws:
InvalidConfigurationException
Since:
3.0 (since 2.0 without a_configuration)
Method Detail

operate

public void operate(Population a_population,
                    java.util.List a_candidateChromosomes)
Executes the operation.

Parameters:
a_population - containing chromosomes to be mutated
a_candidateChromosomes - resulting chromosomes
Since:
2.0

compareTo

public int compareTo(java.lang.Object a_other)
Compares the given GeneticOperator to this GeneticOperator.

Parameters:
a_other - the instance against which to compare this instance
Returns:
a negative number if this instance is "less than" the given instance, zero if they are equal to each other, and a positive number if this is "greater than" the given instance
Since:
2.6

getDeviation

public double getDeviation()
Returns:
the deviation set
Since:
3.1

JGAP