org.jgap.impl
Class GaussianMutationOperator
- java.lang.Object
-
- org.jgap.BaseGeneticOperator
-
- 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
-
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompareTo(java.lang.Object a_other)Compares the given GeneticOperator to this GeneticOperator.doublegetDeviation()voidoperate(Population a_population, java.util.List a_candidateChromosomes)Executes the operation.-
Methods inherited from class org.jgap.BaseGeneticOperator
equals, getConfiguration
-
-
-
-
Constructor Detail
-
GaussianMutationOperator
public GaussianMutationOperator() throws InvalidConfigurationExceptionConstructs 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 usea_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 mutateda_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
-
-
DMelt 3.0 © DataMelt by jWork.ORG