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