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


Public Member Functions | |
| Individual (IndividualFactory *individualFactory) | |
| creates an Individual and generates its tree. | |
| Individual (const Individual &individual) | |
| creates a copy of an Individual | |
| virtual | ~Individual (void) |
| destructor | |
| virtual double | fitness ()=0 |
| The fitness function. | |
| virtual genetiK::Individual * | copy () const =0 |
| Copy this individual. | |
| virtual int | mutate (const double mutationProbabilty) |
| mutate the individual | |
| virtual int | crossOver (genetiK::Individual *i, genetiK::Individual **child1, genetiK::Individual **child2) |
| Cross over. | |
| virtual list< Gene * > | extractListByType (GeneType geneType) |
| Extract a typed list from the tree. | |
This class extends the generic genetiK::Individual. It represents an individual as a gene tree, with the type constraints.
|
|
creates an Individual and generates its tree.
|
|
|
creates a copy of an Individual
|
|
|
Copy this individual. copy this Individual. You should override this function in your Individual implementation, and return the appropriate new Individual, possibly, using the copy constructor. Implements genetiK::gp::Individual. |
|
||||||||||||||||
|
Cross over. This is the same as gp::Individual::crossOver with the type constraint.
Reimplemented from genetiK::gp::Individual. |
|
|
Extract a typed list from the tree. This method is used by the cross over, to excract a list of gene by type.
|
|
|
The fitness function. a function that quantifies the optimality of a solution. You should override this function in your Individual implementation, and evaluate your own fitness. Implements genetiK::gp::Individual. |
|
|
mutate the individual This function is very similar to the gp::Individual::mutate, it only adds the type constraints.
Reimplemented from genetiK::gp::Individual. |
1.4.6