RandomFloat Class Reference
Inheritance diagram for RandomFloat:

Public Member Functions | |
| RandomFloat () | |
| Constructor. | |
| virtual | ~RandomFloat () |
| Destructor. | |
| virtual void | mutate (Genotype *) |
| Mutate the Genotype. | |
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 within range specified with mutationRate probability.
- Warnings
Definition at line 36 of file randomfloat.h.
Constructor & Destructor Documentation
| RandomFloat | ( | ) |
Constructor.
Definition at line 27 of file randomfloat.cpp.
| ~RandomFloat | ( | ) | [virtual] |
Destructor.
Definition at line 31 of file randomfloat.cpp.
Member Function Documentation
| void describe | ( | QString | type | ) | [static] |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Reimplemented from Mutation.
Definition at line 49 of file randomfloat.cpp.
References ParameterSettable::addTypeDescription().
| void mutate | ( | Genotype * | gen | ) | [virtual] |
Mutate the Genotype.
- Warning:
- the Genotype should be a valid RealGenotype
Implements Mutation.
Definition at line 35 of file randomfloat.cpp.
References DoubleGenotype::geneToBitIndex(), RandomGenerator::getBool(), RandomGenerator::getDouble(), globalRNG, DoubleGenotype::maxValue(), DoubleGenotype::minValue(), Mutation::mutationRate(), DoubleGenotype::numGenes(), and DoubleGenotype::set().
The documentation for this class was generated from the following files:
- ga/include/mutations/randomfloat.h
- ga/src/mutations/randomfloat.cpp