ECF 1.5
Public Member Functions | List of all members
Tree::MyTree Class Reference
Inheritance diagram for Tree::MyTree:
Tree::Tree Genotype

Public Member Functions

MyTreecopy ()
 Create an identical copy of the genotype object. More...
 
vector< CrossoverOpP > getCrossoverOp ()
 Create and return a vector of crossover operators. More...
 
vector< MutationOpP > getMutationOp ()
 Create and return a vector of mutation operators. More...
 
bool initialize (StateP state)
 Initialize a genotype object (read parameters, perform sanity check, build data) More...
 
- Public Member Functions inherited from Tree::Tree
Treecopy ()
 Create an identical copy of the genotype object. More...
 
void growBuild (PrimitiveSetP primitiveSet)
 Build tree with grow method. More...
 
void fullBuild (PrimitiveSetP primitiveSet)
 Build tree with full method. More...
 
void update ()
 Calculate depth and subtree sizes of each node in the tree. More...
 
void execute (void *)
 Execute current tree. More...
 
void addNode (Node *node)
 
void addNode (NodeP node)
 
void setTerminalValue (std::string, void *)
 Set a terminal's value. More...
 
void getTerminalValue (std::string, void *)
 Retrieve a terminal's value. More...
 
void write (XMLNode &)
 Write genotype data to XMLNode. More...
 
void read (XMLNode &)
 Read genotype data from XMLNode. More...
 
void registerParameters (StateP)
 Register genotype's parameters (called before Genotype::initialize) More...
 
bool initialize (StateP state)
 Initialize a genotype object (read parameters, perform sanity check, build data) More...
 
std::vector< MutationOpP > getMutationOp ()
 Create and return a vector of mutation operators. More...
 
std::vector< CrossoverOpP > getCrossoverOp ()
 Create and return a vector of crossover operators. More...
 
bool addFunction (PrimitiveP)
 Add user defined function primitive. Must be called prior to initialization (no impact otherwise). More...
 
bool addTerminal (PrimitiveP)
 Add user defined terminal primitive. Must be called prior to initialization (no impact otherwise). More...
 
uint getMaxDepth ()
 
uint getMinDepth ()
 
uint getStartDepth ()
 
- Public Member Functions inherited from Genotype
virtual bool initialize (StateP state)=0
 Initialize a genotype object (read parameters, perform sanity check, build data) More...
 
virtual Genotypecopy ()=0
 Create an identical copy of the genotype object. More...
 
virtual std::vector< CrossoverOpP > getCrossoverOp ()
 Create and return a vector of crossover operators. More...
 
virtual std::vector< MutationOpP > getMutationOp ()
 Create and return a vector of mutation operators. More...
 
virtual void registerParameters (StateP)
 Register genotype's parameters (called before Genotype::initialize) More...
 
bool registerParameter (StateP state, std::string name, voidP value, enum ECF::type T, std::string description="")
 Register a single parameter. More...
 
voidP getParameterValue (StateP state, std::string name)
 Read single parameter value from Registry. More...
 
bool setParameterValue (StateP state, std::string name, voidP value)
 Write single parameter value to Registry. More...
 
bool isParameterDefined (StateP state, std::string name)
 Check if parameter is defined in the configuration. More...
 
virtual void read (XMLNode &)=0
 Read genotype data from XMLNode. More...
 
virtual void write (XMLNode &)=0
 Write genotype data to XMLNode. More...
 
virtual uint getGenomeSize ()
 
std::string getName ()
 Return genotype's name (each genotype is uniquely identified with its name). More...
 
uint getGenotypeId ()
 Return this genotype's index in individual structure. More...
 
void setGenotypeId (uint id)
 Set genotype index in an individual. More...
 
std::string toString ()
 Output genotype to string. More...
 

Additional Inherited Members

- Public Attributes inherited from Tree::Tree
PrimitiveSetP primitiveSet_
 
uint iNode_
 current node index (when parsing the tree) More...
 
uint startDepth_
 start depth of the first node (0 by default) More...
 
uint maxDepth_
 max allowed Tree depth More...
 
uint minDepth_
 min allowed Tree depth More...
 
uint initMaxDepth_
 max allowed Tree depth at initialization (maxDepth_ used if not defined) More...
 
uint initMinDepth_
 min allowed Tree depth at initialization (minDepth_ used if not defined) More...
 
- Protected Member Functions inherited from Tree::Tree
uint growBuild (PrimitiveSetP primitiveSet, uint myDepth)
 Build Tree using 'grow' method. More...
 
uint fullBuild (PrimitiveSetP primitiveSet, uint myDepth)
 Build Tree using 'full' method. More...
 
uint setSize (uint)
 Calculate subtree sizes of each node in the tree. More...
 
void setDepth (uint myDepth)
 Calculate depth of each node in the tree. More...
 
virtual void initializeFirst (Tree *hometree)
 Performs the first Tree initialization (performed only once for each active Tree Genotype). Constructs the primitive set and performs parameter checks. More...
 
- Protected Attributes inherited from Tree::Tree
std::vector< PrimitiveP > userFunctions_
 
std::vector< PrimitiveP > userTerminals_
 
StateP state_
 
- Protected Attributes inherited from Genotype
std::string name_
 genotype's name More...
 
uint genotypeId_
 this genotype's unique index in individual structure More...
 

Detailed Description

Definition at line 33 of file main.cpp.

Constructor & Destructor Documentation

◆ MyTree()

Tree::MyTree::MyTree ( void  )
inline

Definition at line 37 of file main.cpp.

Member Function Documentation

◆ copy()

MyTree * Tree::MyTree::copy ( )
inlinevirtual

Create an identical copy of the genotype object.

Reimplemented from Tree::Tree.

Definition at line 41 of file main.cpp.

◆ getCrossoverOp()

vector< CrossoverOpP > Tree::MyTree::getCrossoverOp ( )
inlinevirtual

Create and return a vector of crossover operators.

Reimplemented from Tree::Tree.

Definition at line 47 of file main.cpp.

◆ getMutationOp()

vector< MutationOpP > Tree::MyTree::getMutationOp ( )
inlinevirtual

Create and return a vector of mutation operators.

Reimplemented from Tree::Tree.

Definition at line 60 of file main.cpp.

◆ initialize()

bool Tree::MyTree::initialize ( StateP  state)
inlinevirtual

Initialize a genotype object (read parameters, perform sanity check, build data)

Reimplemented from Tree::Tree.

Definition at line 69 of file main.cpp.


The documentation for this class was generated from the following file: