DeterministicRank Class Reference
Deterministic Rank Selection. More...

Public Member Functions | |
DeterministicRank () | |
Constructor. | |
virtual | ~DeterministicRank () |
Destructor. | |
virtual void | configure (ConfigurationParameters ¶ms, QString prefix) |
Configure the object using the ConfigurationParameters specified. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the actual status of parameters into the ConfigurationParameters object passed. | |
virtual const Genotype * | select () |
Select a Genotype. | |
virtual void | setGenome (const Genome *g) |
It initialize DeterministicRank. | |
void | setTruncation (int nTruncation) |
Set the truncation parameters. | |
int | truncation () |
Return truncation. | |
Static Public Member Functions | |
static void | describe (QString type) |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups. | |
Protected Attributes | |
int | idNext |
Id of the Genotype to be returned on next select() calls. | |
int | nTruncation |
Truncation; i.e. |
Detailed Description
Deterministic Rank Selection.
- Description
- DeterministicRank select Genotypes starting from the first and cycling modulo truncation parameter.
- Warnings
Definition at line 37 of file deterministicrank.h.
Constructor & Destructor Documentation
Constructor.
Definition at line 27 of file deterministicrank.cpp.
References DeterministicRank::nTruncation.
~DeterministicRank | ( | ) | [virtual] |
Destructor.
Definition at line 32 of file deterministicrank.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 selection parameters
Implements ParameterSettableWithConfigureFunction.
Definition at line 53 of file deterministicrank.cpp.
References ConfigurationParameters::getValue(), and DeterministicRank::nTruncation.
void describe | ( | QString | type | ) | [static] |
Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.
Reimplemented from ParameterSettable.
Definition at line 62 of file deterministicrank.cpp.
References ParameterSettable::addTypeDescription(), ParameterSettable::IntDescriptor::def(), ParameterSettable::Descriptor::describeInt(), ParameterSettable::IntDescriptor::help(), and ParameterSettable::IntDescriptor::limits().
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.
Implements ParameterSettable.
Definition at line 57 of file deterministicrank.cpp.
References ConfigurationParameters::createParameter(), and DeterministicRank::nTruncation.
const Genotype * select | ( | ) | [virtual] |
Select a Genotype.
Implements Selection.
Definition at line 36 of file deterministicrank.cpp.
References Genome::at(), Selection::genome(), DeterministicRank::idNext, and DeterministicRank::nTruncation.
void setGenome | ( | const Genome * | g | ) | [virtual] |
It initialize DeterministicRank.
In details, it will sort the Genome and the next select() will return the first (best) Genotype
Reimplemented from Selection.
Definition at line 40 of file deterministicrank.cpp.
References DeterministicRank::idNext.
void setTruncation | ( | int | nTruncation | ) |
Set the truncation parameters.
Definition at line 45 of file deterministicrank.cpp.
References DeterministicRank::nTruncation.
int truncation | ( | ) |
Return truncation.
Definition at line 49 of file deterministicrank.cpp.
References DeterministicRank::nTruncation.
Member Data Documentation
int idNext [protected] |
Id of the Genotype to be returned on next select() calls.
Definition at line 74 of file deterministicrank.h.
Referenced by DeterministicRank::select(), and DeterministicRank::setGenome().
int nTruncation [protected] |
Truncation; i.e.
: number of selected Genotype
Definition at line 72 of file deterministicrank.h.
Referenced by DeterministicRank::configure(), DeterministicRank::DeterministicRank(), DeterministicRank::save(), DeterministicRank::select(), DeterministicRank::setTruncation(), and DeterministicRank::truncation().
The documentation for this class was generated from the following files:
- ga/include/selections/deterministicrank.h
- ga/src/selections/deterministicrank.cpp