FixedSize Reproduction Class. More...

Inheritance diagram for FixedSize:

Public Member Functions

 FixedSize ()
 Constructor.
 
virtual ~FixedSize ()
 Destructor.
 
virtual void configure (ConfigurationParameters &params, QString prefix)
 Configure by settings passed.
 
Crossovercrossover ()
 Return the Mutation used.
 
double crossoverRate ()
 Return the probability to apply the Crossover.
 
void enableElitism (bool enable=true)
 Enable/Disable Elitism.
 
bool isElitismEnabled ()
 Return true is the Elitism is enabled.
 
Mutationmutation ()
 Return the Mutation used.
 
int numberElited ()
 Return the number of elited Genotypes.
 
virtual Genomereproduction (const Genome *)
 Reproduction Process.
 
virtual void save (ConfigurationParameters &params, QString prefix)
 Save the actual status of parameters into the ConfigurationParameters object passed.
 
Selectionselection ()
 Return the Selection used.
 
void setCrossover (Crossover *muta)
 Set the Crossover to use.
 
void setCrossoverRate (double prob)
 Set the probability to apply the Crossover operator.
 
void setMutation (Mutation *muta)
 Set the Mutation to use.
 
void setNumberElited (unsigned int nelited)
 Set the number of firstly selected Genotype to copy exactly to new generation (elitism)
 
void setSelection (Selection *sel)
 Set the Selection to use.
 
- Public Member Functions inherited from Reproduction
 Reproduction ()
 Constructor.
 
virtual ~Reproduction ()
 Destructor.
 
GeneticAlgoGA ()
 Return the GeneticAlgo used.
 
void setGA (GeneticAlgo *g)
 Set the GeneticAlgo used.
 
- 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.
 

Protected Attributes

Crossovercross
 Crossover used.
 
bool isElitism
 True if elitism is enabled.
 
Mutationmuta
 Mutation used.
 
int nElited
 number of firstly selected Genotype to be elited
 
double probCrossover
 Probability to apply Crossover.
 
Selectionsel
 Selection used.
 
- Protected Attributes inherited from Reproduction
GeneticAlgoga
 GeneticAlgo used.
 

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)
 

Detailed Description

FixedSize Reproduction Class.

Description
The FixedSize Reproduction create a new Genome mantaining exactly the same size of incoming Genome; i.e.: the dimension of population never increase neither decrease.
Warnings

Definition at line 41 of file fixedsize.h.

Constructor & Destructor Documentation

~FixedSize ( )
virtual

Destructor.

Definition at line 41 of file fixedsize.cpp.

Member Function Documentation

Crossover * crossover ( )

Return the Mutation used.

Definition at line 106 of file fixedsize.cpp.

References FixedSize::cross.

Referenced by FixedSize::save().

double crossoverRate ( )

Return the probability to apply the Crossover.

Definition at line 114 of file fixedsize.cpp.

References FixedSize::probCrossover.

void enableElitism ( bool  enable = true)

Enable/Disable Elitism.

Definition at line 118 of file fixedsize.cpp.

References FixedSize::isElitism.

bool isElitismEnabled ( )

Return true is the Elitism is enabled.

Definition at line 122 of file fixedsize.cpp.

References FixedSize::isElitism.

Mutation * mutation ( )

Return the Mutation used.

Definition at line 88 of file fixedsize.cpp.

References FixedSize::muta.

Referenced by FixedSize::save().

int numberElited ( )

Return the number of elited Genotypes.

Definition at line 130 of file fixedsize.cpp.

References FixedSize::nElited.

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 143 of file fixedsize.cpp.

References ConfigurationParameters::createParameter(), ConfigurationParameters::createSubGroup(), FixedSize::crossover(), FixedSize::isElitism, FixedSize::mutation(), FixedSize::nElited, FixedSize::probCrossover, ParameterSettableWithConfigureFunction::save(), Mutation::save(), and FixedSize::selection().

Selection * selection ( )

Return the Selection used.

Definition at line 97 of file fixedsize.cpp.

References FixedSize::sel.

Referenced by FixedSize::save().

void setCrossover ( Crossover muta)

Set the Crossover to use.

Definition at line 101 of file fixedsize.cpp.

References FixedSize::cross, Reproduction::GA(), and Crossover::setGA().

Referenced by FixedSize::configure().

void setCrossoverRate ( double  prob)

Set the probability to apply the Crossover operator.

Note
set to zero in order to disable Crossover

Definition at line 110 of file fixedsize.cpp.

References FixedSize::probCrossover.

void setMutation ( Mutation muta)

Set the Mutation to use.

Definition at line 83 of file fixedsize.cpp.

References Reproduction::GA(), FixedSize::muta, and Mutation::setGA().

Referenced by FixedSize::configure().

void setNumberElited ( unsigned int  nelited)

Set the number of firstly selected Genotype to copy exactly to new generation (elitism)

Definition at line 126 of file fixedsize.cpp.

References FixedSize::nElited.

void setSelection ( Selection sel)

Set the Selection to use.

Definition at line 92 of file fixedsize.cpp.

References Reproduction::GA(), FixedSize::sel, and Selection::setGA().

Referenced by FixedSize::configure().

Member Data Documentation

bool isElitism
protected
Mutation* muta
protected
int nElited
protected
double probCrossover
protected

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