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


Public Member Functions | |
| IndividualFactory (unsigned char maxHeight, gp::ETreeInitialization treeInitialization, GeneType rootType) | |
| Creates a factory that creates Individual objects for the Strongly Typed Genetic Programming. | |
| virtual | ~IndividualFactory () |
| Destructor. | |
| genetiK::Individual * | generate ()=0 |
| abstract generate function | |
| GeneType | getNextType () const |
| return the type of the next gene to be created | |
| void | setNextType (const GeneType nextGeneType) |
| set the type of the next gene to be created | |
| virtual gp::Gene * | generateBranch (unsigned char height, ETreeInitialization treeInitialization) |
| generate a new branch | |
Protected Member Functions | |
| virtual gp::Gene * | generateGene (EGenerateGeneFlags flags)=0 |
| abstract generate gene function | |
| virtual gp::Gene * | generateTree () |
| generate a new tree It simply calls the generateBranch with the appropriate height and root type. | |
| virtual void | generateChildren (gp::Gene *branchRoot, unsigned char height) |
| populate a node generating all its subbranches This method generates all branchRoot subbranches. | |
This class extends the genetiK::gp::Individual class. It represents an individual as a typed gene tree.
|
||||||||||||||||
|
Creates a factory that creates Individual objects for the Strongly Typed Genetic Programming.
|
|
|
abstract generate function This function must be extended by sublcasses to generate appropriate individuals.
Implements genetiK::gp::IndividualFactory. |
|
||||||||||||
|
generate a new branch This function generate a new branch.
Reimplemented from genetiK::gp::IndividualFactory. |
|
||||||||||||
|
populate a node generating all its subbranches This method generates all branchRoot subbranches.
Reimplemented from genetiK::gp::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 and the nextGeneType returning a new random gene of type getNextType(). If the new created gene doesn't satisfy the specified rules, an Exception will be thrown
|
|
|
generate a new tree It simply calls the generateBranch with the appropriate height and root type.
Reimplemented from genetiK::gp::IndividualFactory. |
|
|
return the type of the next gene to be created Specifies the type of the next gene to be created.
|
|
|
set the type of the next gene to be created Specifies the next type of the gene to be created.
|
1.4.6