Public Member Functions | Protected Attributes | Friends

Tree::PrimitiveSet Class Reference
[GenotypesTree]

Primitive set class: collects all Tree Primitives. More...

#include <PrimitiveSet.h>

List of all members.

Public Member Functions

bool initialize (StateP state)
bool addFunction (std::string name)
 Add a function primitive to the set of active primitives - if found by name. If a function takes 0 arguments, it is added to the terminal set.
void addTerminal (PrimitiveP terminalPrimitive)
 Add a terminal primitive to the set of active primitives.
PrimitiveP getRandomTerminal ()
PrimitiveP getRandomFunction ()
PrimitiveP getRandomPrimitive ()
PrimitiveP getTerminalByName (std::string name)
PrimitiveP getFunctionByName (std::string name)
PrimitiveP getPrimitiveByName (std::string name)
uint getFunctionSetSize ()
uint getTerminalSetSize ()
uint getPrimitivesSize ()

Protected Attributes

StateP state_
std::map< std::string, PrimitiveP > mAllPrimitives_
 map of all registered primitive functions
std::map< std::string,
Primitives::terminal_type > 
mTypeNames_
std::vector< PrimitiveP > terminalSet_
 vector of active (actual used) terminals
std::map< std::string, PrimitiveP > mTerminalSet_
 map of active (actual used) terminals
std::vector< PrimitiveP > functionSet_
 vector of active (actual used) functions
std::map< std::string, PrimitiveP > mFunctionSet_
 map of active (actual used) functions
std::vector< PrimitiveP > primitives_
 vector of active (actual used) primitives
std::map< std::string, PrimitiveP > mPrimitiveSet_
 map of active (actual used) primitives

Friends

class Tree

Detailed Description

Primitive set class: collects all Tree Primitives.

Each Tree genotype (if there are more Trees in the Individual) has a unique PrimitiveSet. Each unique instance is linked to the appropriate Tree object in State (the 'hometree' variable name).

Definition at line 17 of file PrimitiveSet.h.


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