ECF 1.5
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Tree::PrimitiveSetAP Class Reference

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

#include <PrimitiveSetAP.h>

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 in collection of all primitives. If a function takes 0 arguments, it is added to the terminal set. More...
 
void addTerminal (PrimitiveP terminalPrimitive)
 Add a terminal primitive to the set of active primitives. More...
 
PrimitiveP getTerminalByName (std::string name)
 Access terminal by name (active terminals only). More...
 
PrimitiveP getGFSOneByName (std::string name)
 Access function by name (active functions only). More...
 
PrimitiveP getGFSTwoByName (std::string name)
 Access function by name (active functions only). More...
 
PrimitiveP getPrimitiveByName (std::string name)
 Access primitive by name (active functions or terminals only). More...
 
PrimitiveP getTerminalByIndex (uint index)
 
PrimitiveP getGFSOneByIndex (uint index)
 
PrimitiveP getGFSTwoByIndex (uint index)
 
PrimitiveP getPrimitiveByIndex (uint index)
 
uint getGFSOneSetSize ()
 
uint getGFSTwoSetSize ()
 
uint getFunctionSetSize ()
 
uint getTerminalSetSize ()
 Get the number of active terminals. More...
 
uint getPrimitivesSize ()
 Get the number of active primitives (functions and terminals). More...
 
bool initialize (StateP state)
 
bool addFunction (std::string name)
 
void addTerminal (PrimitiveP terminalPrimitive)
 
PrimitiveP getTerminalByName (std::string name)
 
PrimitiveP getGFSOneByName (std::string name)
 
PrimitiveP getGFSTwoByName (std::string name)
 
PrimitiveP getPrimitiveByName (std::string name)
 
PrimitiveP getTerminalByIndex (uint index)
 
PrimitiveP getGFSOneByIndex (uint index)
 
PrimitiveP getGFSTwoByIndex (uint index)
 
PrimitiveP getPrimitiveByIndex (uint index)
 
uint getGFSOneSetSize ()
 
uint getGFSTwoSetSize ()
 
uint getFunctionSetSize ()
 
uint getTerminalSetSize ()
 
uint getPrimitivesSize ()
 

Public Attributes

std::map< std::string, PrimitiveP > mAllPrimitives_
 map of all registered primitive functions More...
 
std::map< std::string, Primitives::terminal_type > mTypeNames_
 

Protected Attributes

StateP state_
 
std::vector< PrimitiveP > terminalSet_
 vector of active (actual used) terminals More...
 
std::map< std::string, PrimitiveP > mTerminalSet_
 map of active (actual used) terminals More...
 
std::vector< PrimitiveP > GFSOneSet_
 vector of active (actual used) functions More...
 
std::map< std::string, PrimitiveP > mGFSOneSet_
 map of active (actual used) functions More...
 
std::vector< PrimitiveP > GFSTwoSet_
 vector of active (actual used) functions More...
 
std::map< std::string, PrimitiveP > mGFSTwoSet_
 map of active (actual used) functions More...
 
std::vector< PrimitiveP > primitives_
 vector of active (actual used) primitives More...
 
std::map< std::string, PrimitiveP > mPrimitiveSet_
 map of active (actual used) primitives More...
 

Detailed Description

Primitive set class for APGenotype: collects all Tree Primitives.

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 18 of file PrimitiveSetAP.h.

Constructor & Destructor Documentation

◆ PrimitiveSetAP()

Tree::PrimitiveSetAP::PrimitiveSetAP ( )

Definition at line 9 of file PrimitiveSetAP.cpp.

◆ ~PrimitiveSetAP()

Tree::PrimitiveSetAP::~PrimitiveSetAP ( )
virtual

Definition at line 13 of file PrimitiveSetAP.cpp.

Member Function Documentation

◆ addFunction()

bool Tree::PrimitiveSetAP::addFunction ( std::string  name)

Add a function primitive to the set of active primitives - if found by name in collection of all primitives. If a function takes 0 arguments, it is added to the terminal set.

Definition at line 121 of file PrimitiveSetAP.cpp.

◆ addTerminal()

void Tree::PrimitiveSetAP::addTerminal ( PrimitiveP  terminalPrimitive)

Add a terminal primitive to the set of active primitives.

Definition at line 152 of file PrimitiveSetAP.cpp.

◆ getFunctionSetSize()

uint Tree::PrimitiveSetAP::getFunctionSetSize ( )

Definition at line 162 of file PrimitiveSetAP.cpp.

◆ getGFSOneByIndex()

PrimitiveP Tree::PrimitiveSetAP::getGFSOneByIndex ( uint  index)

Definition at line 104 of file PrimitiveSetAP.cpp.

◆ getGFSOneByName()

PrimitiveP Tree::PrimitiveSetAP::getGFSOneByName ( std::string  name)

Access function by name (active functions only).

Definition at line 59 of file PrimitiveSetAP.cpp.

◆ getGFSOneSetSize()

uint Tree::PrimitiveSetAP::getGFSOneSetSize ( )

Definition at line 167 of file PrimitiveSetAP.cpp.

◆ getGFSTwoByIndex()

PrimitiveP Tree::PrimitiveSetAP::getGFSTwoByIndex ( uint  index)

Definition at line 108 of file PrimitiveSetAP.cpp.

◆ getGFSTwoByName()

PrimitiveP Tree::PrimitiveSetAP::getGFSTwoByName ( std::string  name)

Access function by name (active functions only).

Definition at line 69 of file PrimitiveSetAP.cpp.

◆ getGFSTwoSetSize()

uint Tree::PrimitiveSetAP::getGFSTwoSetSize ( )

Definition at line 172 of file PrimitiveSetAP.cpp.

◆ getPrimitiveByIndex()

PrimitiveP Tree::PrimitiveSetAP::getPrimitiveByIndex ( uint  index)

Definition at line 112 of file PrimitiveSetAP.cpp.

◆ getPrimitiveByName()

PrimitiveP Tree::PrimitiveSetAP::getPrimitiveByName ( std::string  name)

Access primitive by name (active functions or terminals only).

Definition at line 91 of file PrimitiveSetAP.cpp.

◆ getPrimitivesSize()

uint Tree::PrimitiveSetAP::getPrimitivesSize ( )

Get the number of active primitives (functions and terminals).

Definition at line 184 of file PrimitiveSetAP.cpp.

◆ getTerminalByIndex()

PrimitiveP Tree::PrimitiveSetAP::getTerminalByIndex ( uint  index)

Definition at line 100 of file PrimitiveSetAP.cpp.

◆ getTerminalByName()

PrimitiveP Tree::PrimitiveSetAP::getTerminalByName ( std::string  name)

Access terminal by name (active terminals only).

Definition at line 80 of file PrimitiveSetAP.cpp.

◆ getTerminalSetSize()

uint Tree::PrimitiveSetAP::getTerminalSetSize ( )

Get the number of active terminals.

Definition at line 178 of file PrimitiveSetAP.cpp.

◆ initialize()

bool Tree::PrimitiveSetAP::initialize ( StateP  state)

Definition at line 17 of file PrimitiveSetAP.cpp.

Member Data Documentation

◆ GFSOneSet_

std::vector< PrimitiveP > Tree::PrimitiveSetAP::GFSOneSet_
protected

vector of active (actual used) functions

Definition at line 55 of file PrimitiveSetAP.h.

◆ GFSTwoSet_

std::vector< PrimitiveP > Tree::PrimitiveSetAP::GFSTwoSet_
protected

vector of active (actual used) functions

Definition at line 57 of file PrimitiveSetAP.h.

◆ mAllPrimitives_

std::map< std::string, PrimitiveP > Tree::PrimitiveSetAP::mAllPrimitives_

map of all registered primitive functions

Definition at line 47 of file PrimitiveSetAP.h.

◆ mGFSOneSet_

std::map< std::string, PrimitiveP > Tree::PrimitiveSetAP::mGFSOneSet_
protected

map of active (actual used) functions

Definition at line 56 of file PrimitiveSetAP.h.

◆ mGFSTwoSet_

std::map< std::string, PrimitiveP > Tree::PrimitiveSetAP::mGFSTwoSet_
protected

map of active (actual used) functions

Definition at line 58 of file PrimitiveSetAP.h.

◆ mPrimitiveSet_

std::map< std::string, PrimitiveP > Tree::PrimitiveSetAP::mPrimitiveSet_
protected

map of active (actual used) primitives

Definition at line 60 of file PrimitiveSetAP.h.

◆ mTerminalSet_

std::map< std::string, PrimitiveP > Tree::PrimitiveSetAP::mTerminalSet_
protected

map of active (actual used) terminals

Definition at line 54 of file PrimitiveSetAP.h.

◆ mTypeNames_

std::map< std::string, Primitives::terminal_type > Tree::PrimitiveSetAP::mTypeNames_

Definition at line 48 of file PrimitiveSetAP.h.

◆ primitives_

std::vector< PrimitiveP > Tree::PrimitiveSetAP::primitives_
protected

vector of active (actual used) primitives

Definition at line 59 of file PrimitiveSetAP.h.

◆ state_

StateP Tree::PrimitiveSetAP::state_
protected

Definition at line 51 of file PrimitiveSetAP.h.

◆ terminalSet_

std::vector< PrimitiveP > Tree::PrimitiveSetAP::terminalSet_
protected

vector of active (actual used) terminals

Definition at line 53 of file PrimitiveSetAP.h.


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