genetiK::gp::st::Individual Class Reference
[Strongly Typed Genetic Programming framework]

Individual: GP-ST-specific Individual. More...

#include <Individual.h>

Inheritance diagram for genetiK::gp::st::Individual:

Inheritance graph
[legend]
Collaboration diagram for genetiK::gp::st::Individual:

Collaboration graph
[legend]
List of all members.

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::Individualcopy () 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.

Detailed Description

Individual: GP-ST-specific Individual.

This class extends the generic genetiK::Individual. It represents an individual as a gene tree, with the type constraints.


Constructor & Destructor Documentation

genetiK::gp::st::Individual::Individual IndividualFactory individualFactory  ) 
 

creates an Individual and generates its tree.

Parameters:
individualFactory specifies the individualFactory used to generate the tree
See also:
Individual(const Individual& individual)

genetiK::gp::st::Individual::Individual const Individual individual  ) 
 

creates a copy of an Individual

Parameters:
individual the Individual to be copied
See also:
Individual(const Individual& individual)


Member Function Documentation

virtual genetiK::Individual* genetiK::gp::st::Individual::copy  )  const [pure virtual]
 

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.

See also:
Individual(const Individual& individual)

Implements genetiK::gp::Individual.

int genetiK::gp::st::Individual::crossOver genetiK::Individual i,
genetiK::Individual **  child1,
genetiK::Individual **  child2
[virtual]
 

Cross over.

This is the same as gp::Individual::crossOver with the type constraint.

Parameters:
i the partner of the cross over.
child1 the first child.
child2 the second child.
See also:
gp::Individual::crossOver(genetiK::Individual* i,genetiK::Individual** child1,genetiK::Individual** child2)

Reimplemented from genetiK::gp::Individual.

list< Gene * > genetiK::gp::st::Individual::extractListByType GeneType  geneType  )  [virtual]
 

Extract a typed list from the tree.

This method is used by the cross over, to excract a list of gene by type.

Parameters:
geneType the type

virtual double genetiK::gp::st::Individual::fitness  )  [pure virtual]
 

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.

int genetiK::gp::st::Individual::mutate const double  mutationProbabilty  )  [virtual]
 

mutate the individual

This function is very similar to the gp::Individual::mutate, it only adds the type constraints.

Parameters:
mutationProbabilty the probability of the mutation, GP mutate each Individual with this probability. Note that GA mutate each bit with this probability. This function is very similar to the gp::Individual::mutate, it only adds the type constraints.
See also:
gp::Individual::mutate(const double mutationProbabilty)

Reimplemented from genetiK::gp::Individual.


The documentation for this class was generated from the following files:
Generated on Thu Feb 23 12:22:36 2006 for GenetiK by  doxygen 1.4.6