ECF 1.5
|
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... | |
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.
Tree::PrimitiveSetAP::PrimitiveSetAP | ( | ) |
Definition at line 9 of file PrimitiveSetAP.cpp.
|
virtual |
Definition at line 13 of file PrimitiveSetAP.cpp.
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.
void Tree::PrimitiveSetAP::addTerminal | ( | PrimitiveP | terminalPrimitive | ) |
Add a terminal primitive to the set of active primitives.
Definition at line 152 of file PrimitiveSetAP.cpp.
uint Tree::PrimitiveSetAP::getFunctionSetSize | ( | ) |
Definition at line 162 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getGFSOneByIndex | ( | uint | index | ) |
Definition at line 104 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getGFSOneByName | ( | std::string | name | ) |
Access function by name (active functions only).
Definition at line 59 of file PrimitiveSetAP.cpp.
uint Tree::PrimitiveSetAP::getGFSOneSetSize | ( | ) |
Definition at line 167 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getGFSTwoByIndex | ( | uint | index | ) |
Definition at line 108 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getGFSTwoByName | ( | std::string | name | ) |
Access function by name (active functions only).
Definition at line 69 of file PrimitiveSetAP.cpp.
uint Tree::PrimitiveSetAP::getGFSTwoSetSize | ( | ) |
Definition at line 172 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getPrimitiveByIndex | ( | uint | index | ) |
Definition at line 112 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getPrimitiveByName | ( | std::string | name | ) |
Access primitive by name (active functions or terminals only).
Definition at line 91 of file PrimitiveSetAP.cpp.
uint Tree::PrimitiveSetAP::getPrimitivesSize | ( | ) |
Get the number of active primitives (functions and terminals).
Definition at line 184 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getTerminalByIndex | ( | uint | index | ) |
Definition at line 100 of file PrimitiveSetAP.cpp.
PrimitiveP Tree::PrimitiveSetAP::getTerminalByName | ( | std::string | name | ) |
Access terminal by name (active terminals only).
Definition at line 80 of file PrimitiveSetAP.cpp.
uint Tree::PrimitiveSetAP::getTerminalSetSize | ( | ) |
Get the number of active terminals.
Definition at line 178 of file PrimitiveSetAP.cpp.
bool Tree::PrimitiveSetAP::initialize | ( | StateP | state | ) |
Definition at line 17 of file PrimitiveSetAP.cpp.
|
protected |
vector of active (actual used) functions
Definition at line 55 of file PrimitiveSetAP.h.
|
protected |
vector of active (actual used) functions
Definition at line 57 of file PrimitiveSetAP.h.
std::map< std::string, PrimitiveP > Tree::PrimitiveSetAP::mAllPrimitives_ |
map of all registered primitive functions
Definition at line 47 of file PrimitiveSetAP.h.
|
protected |
map of active (actual used) functions
Definition at line 56 of file PrimitiveSetAP.h.
|
protected |
map of active (actual used) functions
Definition at line 58 of file PrimitiveSetAP.h.
|
protected |
map of active (actual used) primitives
Definition at line 60 of file PrimitiveSetAP.h.
|
protected |
map of active (actual used) terminals
Definition at line 54 of file PrimitiveSetAP.h.
std::map< std::string, Primitives::terminal_type > Tree::PrimitiveSetAP::mTypeNames_ |
Definition at line 48 of file PrimitiveSetAP.h.
|
protected |
vector of active (actual used) primitives
Definition at line 59 of file PrimitiveSetAP.h.
|
protected |
Definition at line 51 of file PrimitiveSetAP.h.
|
protected |
vector of active (actual used) terminals
Definition at line 53 of file PrimitiveSetAP.h.