16 # include "GA/i_generator.h"
46 typedef IDNA *(*DNACrossover)(
const IDNA *,
const IDNA *);
void setDNACrossover(DNACrossover function)
Set the crossover function pointer.
Definition: ga_config.cc:89
bool isValid(void) const
Return if the configuration is valid.
Definition: ga_config.cc:51
DNAFitness getDNAFitness(void) const
Get the function pointer to evaluate the fitness.
Definition: ga_config.cc:112
DNACrossover getDNACrossover(void) const
Get the function pointer to cross two IDNA.
Definition: ga_config.cc:122
Define the interface that will be used to create an supported individual for the GAEngine.
Definition: i_dna.h:22
Define the interface that allow to define a new generator of individual for the GAEngine.
Definition: i_generator.h:22
Contains the objects that define the GAEngine.
void setDNACompare(DNACompare function)
Set the function pointer to compare two IDNA.
Definition: ga_config.cc:84
void setGenerator(IGenerator *generator)
Set the generator.
Definition: ga_config.cc:74
GAConfig(void)
Constructor.
Definition: ga_config.cc:20
void setDNAFitness(DNAFitness function)
Set the fitness function pointer.
Definition: ga_config.cc:79
void setDNAMutate(DNAMutate function)
Set the mutation function pointer.
Definition: ga_config.cc:94
Define the configuration of the GAEngine.
Definition: ga_config.h:24
~GAConfig(void)
Destructor.
Definition: ga_config.cc:25
void(* DNAFitness)(IDNA *, double *)
Function pointer that define the evaluation of an AI.
Definition: ga_config.h:38
DNAMutate getDNAMutate(void) const
Get the function pointer to mutate an IDNA object.
Definition: ga_config.cc:127
bool isEvaluated(void) const
Return if the function pointer, setted in order to evaluate the population, is not NULL...
Definition: ga_config.cc:46
void setEvaluation(FEvaluate function)
Set the evaluation function pointer.
Definition: ga_config.cc:69
IGenerator * getGenerator(void) const
Get the generator member.
Definition: ga_config.cc:107
bool(* DNACompare)(const IDNA *, const IDNA *)
Function pointer that define how to compare two IDNA.
Definition: ga_config.h:42
void(* DNAMutate)(IDNA *)
Function pointer that define how to mutate a IDNA.
Definition: ga_config.h:50
IDNA *(* DNACrossover)(const IDNA *, const IDNA *)
Function pointer that define how to cross two IDNA.
Definition: ga_config.h:46
DNACompare getDNACompare(void) const
Get the function pointer to compare two IDNA.
Definition: ga_config.cc:117
void(* FEvaluate)(std::list< IDNA * > &)
Function pointer to evaluate the population.
Definition: ga_config.h:34
FEvaluate getEvaluation(void) const
Get the evaluation function pointer.
Definition: ga_config.cc:102