One-Point Crossover for Genotype. More...

Inheritance diagram for OnePoint:

List of all members.

Public Member Functions

 OnePoint ()
 Constructor.
virtual ~OnePoint ()
 Destructor.
virtual void configure (ConfigurationParameters &params, QString prefix)
 NOT USED.
virtual void crossover (Genotype *father, const Genotype *mother)
 Crossover two Genotypes and return the father modified.
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.

Static Public Member Functions

static void describe (QString type)
 Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.

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.

~OnePoint ( ) [virtual]

Destructor.

Definition at line 30 of file onepoint.cpp.


Member Function Documentation

void configure ( ConfigurationParameters params,
QString  prefix 
) [virtual]

NOT USED.

Implements ParameterSettableWithConfigureFunction.

Definition at line 44 of file onepoint.cpp.

void crossover ( Genotype father,
const Genotype mother 
) [virtual]

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(), RandomGenerator::getInt(), globalRNG, Genotype::size(), and Genotype::toggle().

void describe ( QString  type) [static]

Add to Factory::typeDescriptions() the descriptions of all parameters and subgroups.

Reimplemented from ParameterSettable.

Definition at line 54 of file onepoint.cpp.

References ParameterSettable::addTypeDescription().

void save ( ConfigurationParameters params,
QString  prefix 
) [virtual]

Save the actual status of parameters into the ConfigurationParameters object passed.

Parameters:
paramsthe configuration parameters object on which save actual parameters
prefixthe prefix to use to access the object configuration parameters.

Implements ParameterSettable.

Definition at line 50 of file onepoint.cpp.

References ConfigurationParameters::createParameter().


The documentation for this class was generated from the following files: