One-Point Crossover for Genotype. More...
![Inheritance graph](classfarsa_1_1OnePoint__inherit__graph.png)
Public Member Functions | |
OnePoint () | |
Constructor. | |
virtual | ~OnePoint () |
Destructor. | |
virtual void | configure (ConfigurationParameters ¶ms, QString prefix) |
NOT USED. | |
virtual void | crossover (Genotype *father, const Genotype *mother) |
Crossover two Genotypes and return the father modified. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. | |
![]() | |
Crossover () | |
Constructor. | |
virtual | ~Crossover () |
Destructor. | |
GeneticAlgo * | GA () |
Return the GeneticAlgo used. | |
const Genome * | genome () |
Return the Genome. | |
void | setGA (GeneticAlgo *g) |
Set the GeneticAlgo used. | |
void | setGenome (const Genome *g) |
Set the Genome where Genotypes lives. | |
![]() | |
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. | |
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
One-Point Crossover for Genotype.
- Description
- OnePoint crossover select a random bit as split-point and replace the part of the father beyond split-point with the corresponding part of the mother:
Split-point +-----------------+------------+ \ 011010110101101 \ 1101101010 \ <= Father +-----------------+------------+ +-----------------+------------+ \ *************** \ 0001010101 \ <= Mother +-----------------+------------+ +-----------------+------------+ \ 011010110101101 \ 0001010101 \ <= Child +-----------------+------------+
- Warnings
Definition at line 49 of file onepoint.h.
Constructor & Destructor Documentation
OnePoint | ( | ) |
Constructor.
Definition at line 27 of file onepoint.cpp.
|
virtual |
Destructor.
Definition at line 30 of file onepoint.cpp.
Member Function Documentation
|
virtual |
NOT USED.
Implements ParameterSettableWithConfigureFunction.
Definition at line 44 of file onepoint.cpp.
Crossover two Genotypes and return the father modified.
- Note
- the mother will not changed, while the father will be replaced by new one
Implements Crossover.
Definition at line 34 of file onepoint.cpp.
References Genotype::bit(), globalRNG, Genotype::size(), and Genotype::toggle().
|
static |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Definition at line 54 of file onepoint.cpp.
References ParameterSettableWithConfigureFunction::addTypeDescription().
|
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.
Implements ParameterSettableWithConfigureFunction.
Definition at line 50 of file onepoint.cpp.
References ConfigurationParameters::createParameter().
The documentation for this class was generated from the following files:
- ga/include/crossovers/onepoint.h
- ga/src/crossovers/onepoint.cpp