Static Public Member Functions | |
static Chromo | doGeneticAlg (const Chromo &initChromo, char *outputFileName=NULL) |
Does a genetic algorithm and returns the final chromosome. | |
static double | getDiversity (const std::vector< Chromo > &chr, unsigned int chromoIndex) |
Static Public Attributes | |
static GAOpts | gaOpts |
Protected Member Functions | |
Population (const Chromo &i_chromo, code::Random &rnd) | |
Population | getNextGen (code::Random &rnd) const |
void | randomize (code::Random &rnd, double frac) |
void | anneal (code::Random &rnd, double frac) |
Chromo | getBestChromo () const |
Protected Attributes | |
std::vector< Chromo > | chromos |
int | generation |
w2img::Population::Population | ( | const Chromo & | i_chromo, | |
code::Random & | rnd | |||
) | [protected] |
void w2img::Population::anneal | ( | code::Random & | rnd, | |
double | frac | |||
) | [protected] |
static Chromo w2img::Population::doGeneticAlg | ( | const Chromo & | initChromo, | |
char * | outputFileName = NULL | |||
) | [static] |
Does a genetic algorithm and returns the final chromosome.
If necessary, change the gaOpts variable.
Chromo w2img::Population::getBestChromo | ( | ) | const [protected] |
static double w2img::Population::getDiversity | ( | const std::vector< Chromo > & | chr, | |
unsigned int | chromoIndex | |||
) | [static] |
Population w2img::Population::getNextGen | ( | code::Random & | rnd | ) | const [protected] |
void w2img::Population::randomize | ( | code::Random & | rnd, | |
double | frac | |||
) | [protected] |
std::vector<Chromo> w2img::Population::chromos [protected] |
GAOpts w2img::Population::gaOpts [static] |
int w2img::Population::generation [protected] |