GaussianFloat Class Reference
GaussianFloat Mutation. More...

Public Member Functions | |
GaussianFloat () | |
Constructor. | |
virtual | ~GaussianFloat () |
Destructor. | |
virtual void | configure (ConfigurationParameters ¶ms, QString prefix) |
Configure the object using the ConfigurationParameters specified. | |
virtual void | mutate (Genotype *) |
Mutate the Genotype. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. | |
void | setVariance (double v) |
Sets the variance of the gaussian distribution. | |
double | variance () const |
Returns the variance of the gaussian distribution. | |
Static Public Member Functions | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. |
Detailed Description
- Description
- Change the i-th float number with a new random value according to a Gaussian distribution centered over the current value of the gene
- Warnings
Definition at line 37 of file gaussianfloat.h.
Constructor & Destructor Documentation
GaussianFloat | ( | ) |
Constructor.
Definition at line 28 of file gaussianfloat.cpp.
~GaussianFloat | ( | ) | [virtual] |
Destructor.
Definition at line 33 of file gaussianfloat.cpp.
Member Function Documentation
void configure | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) | [virtual] |
Configure the object using the ConfigurationParameters specified.
- Parameters:
-
params the object with configuration parameters prefix the group in which parameters are expected to be (this is terminated by a separator character). We expect to receive as prefix the group with mutation parameters
Reimplemented from Mutation.
Definition at line 54 of file gaussianfloat.cpp.
References ConfigurationParameters::getValue().
void describe | ( | QString | type | ) | [static] |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Reimplemented from Mutation.
Definition at line 64 of file gaussianfloat.cpp.
References ParameterSettable::addTypeDescription(), ParameterSettable::RealDescriptor::def(), ParameterSettable::Descriptor::describeReal(), ParameterSettable::RealDescriptor::help(), and ParameterSettable::RealDescriptor::limits().
void mutate | ( | Genotype * | gen | ) | [virtual] |
Mutate the Genotype.
- Warning:
- the Genotype should be a valid RealGenotype
Implements Mutation.
Definition at line 37 of file gaussianfloat.cpp.
References DoubleGenotype::at(), DoubleGenotype::geneToBitIndex(), RandomGenerator::getBool(), RandomGenerator::getGaussian(), globalRNG, DoubleGenotype::maxValue(), DoubleGenotype::minValue(), Mutation::mutationRate(), DoubleGenotype::numGenes(), and DoubleGenotype::set().
void save | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) | [virtual] |
Save the actual status of parameters into the ConfigurationParameters object passed.
- Parameters:
-
params the configuration parameters object on which save actual parameters prefix the prefix to use to access the object configuration parameters.
Reimplemented from Mutation.
Definition at line 70 of file gaussianfloat.cpp.
References ConfigurationParameters::createParameter().
void setVariance | ( | double | v | ) | [inline] |
Sets the variance of the gaussian distribution.
- Parameters:
-
v the new variance
Definition at line 68 of file gaussianfloat.h.
double variance | ( | ) | const [inline] |
Returns the variance of the gaussian distribution.
- Returns:
- the variance of the gaussian distribution
Definition at line 77 of file gaussianfloat.h.
The documentation for this class was generated from the following files:
- ga/include/mutations/gaussianfloat.h
- ga/src/mutations/gaussianfloat.cpp