RandomBit Class Reference
Inheritance diagram for RandomBit:
![Inheritance graph](classfarsa_1_1RandomBit__inherit__graph.png)
Public Member Functions | |
RandomBit () | |
Constructor. | |
virtual | ~RandomBit () |
Destructor. | |
virtual void | mutate (Genotype *) |
Mutate the Genotype. | |
![]() | |
Mutation () | |
Constructor. | |
virtual | ~Mutation () |
Destructor. | |
virtual void | configure (ConfigurationParameters ¶ms, QString prefix) |
Configure the object using the ConfigurationParameters specified. | |
double | finalMutationRate (int bit) |
Returns the final mutation rate for the specified bit of the genotype. | |
GeneticAlgo * | GA () |
Return the GeneticAlgo used. | |
const Genome * | genome () |
Return the Genome. | |
double | initialMutationRate (int bit) |
Returns the initial mutation rate for the specified bit of the genotype. | |
double | mutationRate (int bit) |
Returns the current mutation rate for the specified bit of the genotype. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. | |
void | setGA (GeneticAlgo *g) |
Set the GeneticAlgo used. | |
void | setGenome (const Genome *g) |
Set the Genome where Genotypes lives. | |
void | setMutationRate (double rate, int start=0, int length=-1) |
Set the mutation rate, i.e. | |
void | setMutationRate (double initialRate, double finalRate, double variation, int start=0, int length=-1) |
Like the other setMutationRate function, but this allows setting the initial rate, the final rate and the variation. | |
double | variationMutationRate (int bit) |
Returns the variation of the mutation rate for the specified bit of the genotype. | |
![]() | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
ParameterSettable () | |
virtual void | postConfigureInitialization () |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
![]() | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
Static Public Member Functions | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. | |
![]() | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. | |
![]() | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
![]() | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
Additional Inherited Members | |
![]() | |
enum | Property |
![]() | |
AllowMultiple | |
Default | |
IsList | |
IsMandatory | |
![]() | |
static const double | Infinity |
static const int | MaxInteger |
static const int | MinInteger |
![]() | |
void | notifyChangesToParam (QString paramName) |
![]() | |
static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
static void | setGraphicalEditor (QString type) |
![]() | |
GeneticAlgo * | ga |
GeneticAlgo used. | |
const Genome * | genomev |
Genome where Genotypes lives. | |
Detailed Description
- Description
- Change the i-th bit with a random one with mutationRate probability.
The new bit is extracted with an equal probability for zero and one.
This differ from FlipBit for at least two points:- it requires the double of random access (extractions)
- if a mutation occur, it remains a 50% probability that bit remain the same
- Warnings
Definition at line 40 of file randombit.h.
Constructor & Destructor Documentation
RandomBit | ( | ) |
Constructor.
Definition at line 26 of file randombit.cpp.
|
virtual |
Destructor.
Definition at line 30 of file randombit.cpp.
Member Function Documentation
|
static |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Definition at line 47 of file randombit.cpp.
References ParameterSettableWithConfigureFunction::addTypeDescription(), and Mutation::describe().
|
virtual |
Mutate the Genotype.
Implements Mutation.
Definition at line 34 of file randombit.cpp.
References globalRNG, Mutation::mutationRate(), Genotype::set(), Genotype::size(), and Genotype::unset().
The documentation for this class was generated from the following files:
- ga/include/mutations/randombit.h
- ga/src/mutations/randombit.cpp