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


Public Types | |
| enum | EGenerateGeneFlags { TERMINAL = 1, FUNCTION = 2 } |
| Node flags. More... | |
Public Member Functions | |
| IndividualFactory (unsigned char maxHeight, ETreeInitialization treeInitialization) | |
| Creates a factory that generates Individual objects for the Genetic Programming. | |
| virtual | ~IndividualFactory () |
| destructor | |
| genetiK::Individual * | generate ()=0 |
| abstract generate function | |
| virtual Gene * | generateGene (EGenerateGeneFlags flags)=0 |
| abstract generate gene function | |
| virtual Gene * | generateBranch (unsigned char height, ETreeInitialization treeInitialization) |
| generate a new branch | |
| virtual Gene * | generateTree () |
| generate a new tree | |
| unsigned char | getMaxHeight () const |
| max heigth of a tree | |
| ETreeInitialization | getTreeInitialization () const |
| return the tree initialization method | |
Protected Member Functions | |
| virtual void | generateChildren (Gene *branchRoot, unsigned char height) |
| populate a node generating all its subbranches | |
This class extends the generic genetiK::IndividualFactory to generate individuals to be used with Genetic Algorithms.
|
||||||||||||
|
Creates a factory that generates Individual objects for the Genetic Programming.
|
|
|
abstract generate function This function must be extended by sublcasses to generate appropriate individuals.
Implements genetiK::IndividualFactory. Implemented in genetiK::gp::st::IndividualFactory. |
|
||||||||||||
|
generate a new branch This function generate a new branch.
Reimplemented in genetiK::gp::st::IndividualFactory. |
|
||||||||||||
|
populate a node generating all its subbranches This method generates all branchRoot subbranches.
Reimplemented in genetiK::gp::st::IndividualFactory. |
|
|
abstract generate gene function This function must be extended by sublcasses to generate appropriate gene. This function returns a random gene obeying the rules specified in flags.
|
|
|
generate a new tree It simply calls the generateBranch with the appropriate height
Reimplemented in genetiK::gp::st::IndividualFactory. |
|
|
max heigth of a tree return the upper bound of a tree height
|
|
|
return the tree initialization method return the tree initialization method
|
1.4.6