LoveBrains
1.0.0
|
Define the configuration of the GAEngine. More...
#include <ga_config.h>
Public Types | |
typedef void(* | FEvaluate) (std::list< IDNA * > &) |
Function pointer to evaluate the population. | |
typedef void(* | DNAFitness) (IDNA *, double *) |
Function pointer that define the evaluation of an AI. | |
typedef bool(* | DNACompare) (const IDNA *, const IDNA *) |
Function pointer that define how to compare two IDNA. | |
typedef IDNA *(* | DNACrossover) (const IDNA *, const IDNA *) |
Function pointer that define how to cross two IDNA. | |
typedef void(* | DNAMutate) (IDNA *) |
Function pointer that define how to mutate a IDNA. | |
typedef void(* | FEvaluate) (std::list< IDNA * > &) |
typedef void(* | DNAFitness) (IDNA *, double *) |
typedef bool(* | DNACompare) (const IDNA *, const IDNA *) |
typedef IDNA *(* | DNACrossover) (const IDNA *, const IDNA *) |
typedef void(* | DNAMutate) (IDNA *) |
Public Member Functions | |
GAConfig (void) | |
Constructor. | |
~GAConfig (void) | |
Destructor. | |
GAConfig & | operator= (GAConfig const &config) |
bool | isEvaluated (void) const |
Return if the function pointer, setted in order to evaluate the population, is not NULL. More... | |
bool | isValid (void) const |
Return if the configuration is valid. More... | |
void | setEvaluation (FEvaluate function) |
Set the evaluation function pointer. More... | |
void | setGenerator (IGenerator *generator) |
Set the generator. More... | |
void | setDNAFitness (DNAFitness function) |
Set the fitness function pointer. More... | |
void | setDNACompare (DNACompare function) |
Set the function pointer to compare two IDNA. More... | |
void | setDNACrossover (DNACrossover function) |
Set the crossover function pointer. More... | |
void | setDNAMutate (DNAMutate function) |
Set the mutation function pointer. More... | |
FEvaluate | getEvaluation (void) const |
Get the evaluation function pointer. More... | |
IGenerator * | getGenerator (void) const |
Get the generator member. More... | |
DNAFitness | getDNAFitness (void) const |
Get the function pointer to evaluate the fitness. More... | |
DNACompare | getDNACompare (void) const |
Get the function pointer to compare two IDNA. More... | |
DNACrossover | getDNACrossover (void) const |
Get the function pointer to cross two IDNA. More... | |
DNAMutate | getDNAMutate (void) const |
Get the function pointer to mutate an IDNA object. More... | |
GAConfig & | operator= (GAConfig const &config) |
bool | isEvaluated (void) const |
bool | isValid (void) const |
void | setEvaluation (FEvaluate function) |
void | setGenerator (IGenerator *generator) |
void | setDNAFitness (DNAFitness function) |
void | setDNACompare (DNACompare function) |
void | setDNACrossover (DNACrossover function) |
void | setDNAMutate (DNAMutate function) |
FEvaluate | getEvaluation (void) const |
IGenerator * | getGenerator (void) const |
DNAFitness | getDNAFitness (void) const |
DNACompare | getDNACompare (void) const |
DNACrossover | getDNACrossover (void) const |
DNAMutate | getDNAMutate (void) const |
Define the configuration of the GAEngine.
GAConfig::DNACompare GA::GAConfig::getDNACompare | ( | void | ) | const |
Get the function pointer to compare two IDNA.
GAConfig::DNACrossover GA::GAConfig::getDNACrossover | ( | void | ) | const |
Get the function pointer to cross two IDNA.
GAConfig::DNAFitness GA::GAConfig::getDNAFitness | ( | void | ) | const |
Get the function pointer to evaluate the fitness.
GAConfig::DNAMutate GA::GAConfig::getDNAMutate | ( | void | ) | const |
Get the function pointer to mutate an IDNA object.
GAConfig::FEvaluate GA::GAConfig::getEvaluation | ( | void | ) | const |
Get the evaluation function pointer.
IGenerator * GA::GAConfig::getGenerator | ( | void | ) | const |
Get the generator member.
bool GA::GAConfig::isEvaluated | ( | void | ) | const |
Return if the function pointer, setted in order to evaluate the population, is not NULL.
bool GA::GAConfig::isValid | ( | void | ) | const |
Return if the configuration is valid.
void GA::GAConfig::setDNACompare | ( | GAConfig::DNACompare | function | ) |
Set the function pointer to compare two IDNA.
function | : Contains the function pointer. |
void GA::GAConfig::setDNACrossover | ( | GAConfig::DNACrossover | function | ) |
Set the crossover function pointer.
function | : Contains the function pointer for the crossover of the population. |
void GA::GAConfig::setDNAFitness | ( | GAConfig::DNAFitness | function | ) |
Set the fitness function pointer.
function | : Contains the function pointer for the evaluation of the fitness. |
void GA::GAConfig::setDNAMutate | ( | GAConfig::DNAMutate | function | ) |
Set the mutation function pointer.
function | : Contains the function pointer for the mutation of the population. |
void GA::GAConfig::setEvaluation | ( | GAConfig::FEvaluate | function | ) |
Set the evaluation function pointer.
function | : Contains the function pointer for the evaluation of the population. |
void GA::GAConfig::setGenerator | ( | IGenerator * | generator | ) |
Set the generator.
generator | : Contains the generator object. |