Public Member Functions | |
double | getFitness () const |
double | calcFitness () |
void | setFitnessFunc (double(*fn)(void *, const Chromo &), void *arg) |
Chromo | anneal (code::Random &rnd, double fitnResol=0.001) const |
Chromo (const std::vector< Gene > &i_genes) | |
bool | setGeneParms (const char *fileName) |
void | mutate (double sigma, code::Random &rnd) |
void | randomize (code::Random &rnd) |
double | getDiversity (const Chromo &otherChromo) const |
void | print (FILE *fp) |
Chromo | crossover (const Chromo &male, code::Random &rnd) |
Chromo () | |
Public Attributes | |
std::vector< Gene > | genes |
Protected Attributes | |
bool | fitnessCalculated |
double(* | fitnessFunc )(void *, const Chromo &) |
void * | fitfuncArgs |
double | fitness |
Friends | |
bool | operator< (const Chromo &a, const Chromo &b) |
bool | operator> (const Chromo &a, const Chromo &b) |
bwer::Chromo::Chromo | ( | const std::vector< Gene > & | i_genes | ) | [inline] |
bwer::Chromo::Chromo | ( | ) | [inline] |
Chromo bwer::Chromo::anneal | ( | code::Random & | rnd, | |
double | fitnResol = 0.001 | |||
) | const |
double bwer::Chromo::calcFitness | ( | ) | [inline] |
double bwer::Chromo::getDiversity | ( | const Chromo & | otherChromo | ) | const |
double bwer::Chromo::getFitness | ( | ) | const [inline] |
void bwer::Chromo::mutate | ( | double | sigma, | |
code::Random & | rnd | |||
) | [inline] |
void bwer::Chromo::print | ( | FILE * | fp | ) |
void bwer::Chromo::randomize | ( | code::Random & | rnd | ) | [inline] |
void bwer::Chromo::setFitnessFunc | ( | double(*)(void *, const Chromo &) | fn, | |
void * | arg | |||
) | [inline] |
bool bwer::Chromo::setGeneParms | ( | const char * | fileName | ) |
void* bwer::Chromo::fitfuncArgs [protected] |
double bwer::Chromo::fitness [protected] |
bool bwer::Chromo::fitnessCalculated [protected] |
double(* bwer::Chromo::fitnessFunc)(void *, const Chromo &) [protected] |
std::vector<Gene> bwer::Chromo::genes |