#include <Individual.h>
Inheritance diagram for genetiK::Individual:

Public Member Functions | |
| Individual (void) | |
| default void constructor | |
| Individual (const Individual &individual) | |
| default copy constructor | |
| virtual | ~Individual (void) |
| default destructor | |
| virtual double | fitness ()=0 |
| abstract fitness function | |
| virtual Individual * | copy () const =0 |
| abstract copy function | |
| virtual int | mutate (const double mutationProbability)=0 |
| abstract mutation | |
| virtual int | crossOver (Individual *i, Individual **child1, Individual **child2)=0 |
| abstract crossover | |
| virtual std::string | toString () const |
| creates a string representing the individual | |
| virtual bool | operator< (Individual &i2) |
| compares fitness between individuals | |
Generic individual to be used with evolutionary algorithms. It is extended by ga::Individual and gp::Individual to provide specific functions oriented towards Genetic Algorithms and Genetic Programming, respectively.
|
|
default void constructor Does nothing |
|
|
default copy constructor Does nothing |
|
|
default destructor Does nothing (class is abstract) Reimplemented in genetiK::ga::Individual, genetiK::gp::Individual, and genetiK::gp::st::Individual. |
|
|
abstract copy function This function must be extended by sublcasses to perform copy.
Implemented in genetiK::ga::Individual, genetiK::gp::Individual, and genetiK::gp::st::Individual. |
|
||||||||||||||||
|
abstract crossover Performs crossover between this and individual i, saving the resulting children in child1 and child2. Subclasses must override this method to perform actual crossover
Implemented in genetiK::ga::Individual, genetiK::gp::Individual, and genetiK::gp::st::Individual. |
|
|
abstract fitness function This function must be extended by sublcasses to calculate the fitness of the individual.
Implemented in genetiK::ga::Individual, genetiK::gp::Individual, and genetiK::gp::st::Individual. |
|
|
abstract mutation Must be overridden in subclasses to perform actual mutation.
Implemented in genetiK::ga::Individual, genetiK::gp::Individual, and genetiK::gp::st::Individual. |
|
|
compares fitness between individuals Defines an total order relation among Individuals using their fitness.
|
|
|
creates a string representing the individual Subclasses must override this method to output an appropriate representation of the Individual.
Reimplemented in genetiK::ga::Individual, and genetiK::gp::Individual. |
1.4.6