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 (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) |
w2img::Chromo::Chromo | ( | const std::vector< Gene > & | i_genes | ) | [inline] |
w2img::Chromo::Chromo | ( | ) | [inline] |
Chromo w2img::Chromo::anneal | ( | code::Random & | rnd, | |
double | fitnResol = 0.001 | |||
) | const |
double w2img::Chromo::calcFitness | ( | ) | [inline] |
double w2img::Chromo::getDiversity | ( | const Chromo & | otherChromo | ) | const |
double w2img::Chromo::getFitness | ( | ) | const [inline] |
void w2img::Chromo::mutate | ( | double | sigma, | |
code::Random & | rnd | |||
) | [inline] |
void w2img::Chromo::print | ( | FILE * | fp | ) |
void w2img::Chromo::randomize | ( | code::Random & | rnd | ) | [inline] |
void w2img::Chromo::setFitnessFunc | ( | double(*)(void *, const Chromo &) | fn, | |
void * | arg | |||
) | [inline] |
bool w2img::Chromo::setGeneParms | ( | char * | fileName | ) |
void* w2img::Chromo::fitfuncArgs [protected] |
double w2img::Chromo::fitness [protected] |
bool w2img::Chromo::fitnessCalculated [protected] |
double(* w2img::Chromo::fitnessFunc)(void *, const Chromo &) [protected] |
std::vector<Gene> w2img::Chromo::genes |