One-Point Crossover for Genotype. More...

Inheritance diagram for OnePoint:

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.
 
- Public Member Functions inherited from Crossover
 Crossover ()
 Constructor.
 
virtual ~Crossover ()
 Destructor.
 
GeneticAlgoGA ()
 Return the GeneticAlgo used.
 
const Genomegenome ()
 Return the Genome.
 
void setGA (GeneticAlgo *g)
 Set the GeneticAlgo used.
 
void setGenome (const Genome *g)
 Set the Genome where Genotypes lives.
 
- Public Member Functions inherited from ParameterSettableWithConfigureFunction
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
virtual ParameterSettableUIgetUIManager ()
 
 ParameterSettable ()
 
virtual void postConfigureInitialization ()
 
void removeObserver (RuntimeParameterObserver *obs)
 
void setRuntimeParameter (QString paramName, T newvalue)
 
QString typeName () const
 
- Public Member Functions inherited from ParameterSettable
void addObserver (RuntimeParameterObserver *obs)
 
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

- Public Types inherited from ParameterSettableWithConfigureFunction
enum  Property
 
- Public Attributes inherited from ParameterSettableWithConfigureFunction
 AllowMultiple
 
 Default
 
 IsList
 
 IsMandatory
 
- Static Public Attributes inherited from ParameterSettableWithConfigureFunction
static const double Infinity
 
static const int MaxInteger
 
static const int MinInteger
 
- Protected Member Functions inherited from ParameterSettableWithConfigureFunction
void notifyChangesToParam (QString paramName)
 
- Static Protected Member Functions inherited from ParameterSettableWithConfigureFunction
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 
- Protected Attributes inherited from Crossover
GeneticAlgoga
 GeneticAlgo used.
 
const Genomegenomev
 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.

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

void describe ( QString  type)
static

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

Definition at line 54 of file onepoint.cpp.

References ParameterSettableWithConfigureFunction::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 ParameterSettableWithConfigureFunction.

Definition at line 50 of file onepoint.cpp.

References ConfigurationParameters::createParameter().


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