ECF 1.5
|
Public Member Functions | |
bool | initialize (StateP state) |
Cartesian * | copy () |
vector< CrossoverOpP > | getCrossoverOp () |
vector< MutationOpP > | getMutationOp () |
void | registerParameters (StateP state) |
void | read (XMLNode &xCart) |
void | write (XMLNode &xCart) |
uint | getGenomeSize () |
void | makeGenotype () |
uint | randInputConn (uint currCol) |
uint | randOutput () |
uint | randFunction () |
void | evaluate (voidP inputs, void *result, uint funcNum) |
void | printGenotype () |
uint | getNumOfInputs () |
uint | getNumOfOutputs () |
uint | getNumOfInputConn () |
voidP | getConstantNames () |
uint | getNumOfRows () |
uint | getNumOfCols () |
uint | getLevelsBack () |
uint | getNumVars () |
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 Genotype * | copy ()=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... | |
Public Attributes | |
FunctionSetP | funcSet |
function nodes More... | |
Protected Attributes | |
StateP | state_ |
local copy of state More... | |
uint | inputs |
number of primary inputs More... | |
uint | outputs |
number of final outputs More... | |
uint | inputConns |
number of input connections More... | |
uint | rows |
number of rows More... | |
uint | cols |
number of columns More... | |
uint | levelsBack |
levels back parameter More... | |
uint | numVars |
number of variables More... | |
uint | numFunc |
number of functions More... | |
voidP | constantset |
all possible constants More... | |
Protected Attributes inherited from Genotype | |
std::string | name_ |
genotype's name More... | |
uint | genotypeId_ |
this genotype's unique index in individual structure More... | |
Definition at line 14 of file Cartesian_c.h.
cart::Cartesian::Cartesian | ( | void | ) |
Definition at line 8 of file Cartesian.cpp.
cart::Cartesian::~Cartesian | ( | void | ) |
Definition at line 13 of file Cartesian.cpp.
|
virtual |
Create an identical copy of the genotype object
Implements Genotype.
Definition at line 238 of file Cartesian.cpp.
void cart::Cartesian::evaluate | ( | voidP | inputs, |
void * | result, | ||
uint | funcNum | ||
) |
Return result for required inputs from node with function with index funcNum.
Definition at line 358 of file Cartesian.cpp.
voidP cart::Cartesian::getConstantNames | ( | ) |
Return all possible constant names.
Definition at line 395 of file Cartesian.cpp.
|
virtual |
Create and return a vector of crossover operators
Reimplemented from Genotype.
Definition at line 249 of file Cartesian.cpp.
|
virtual |
Reimplemented from Genotype.
Definition at line 305 of file Cartesian.cpp.
uint cart::Cartesian::getLevelsBack | ( | ) |
Return levels back parameter - it defines how many previous columns of cells may have their outputs connected to a node in current column (primary inputs are treated in the same way as node outputs).
Definition at line 410 of file Cartesian.cpp.
|
virtual |
Create and return a vector of mutation operators
Reimplemented from Genotype.
Definition at line 256 of file Cartesian.cpp.
uint cart::Cartesian::getNumOfCols | ( | ) |
Return number of columns in genotype.
Definition at line 405 of file Cartesian.cpp.
uint cart::Cartesian::getNumOfInputConn | ( | ) |
Return number of input connections - it defines how many inputs will every node in genotype have.
Definition at line 390 of file Cartesian.cpp.
uint cart::Cartesian::getNumOfInputs | ( | ) |
Return number of primary inputs.
Definition at line 380 of file Cartesian.cpp.
uint cart::Cartesian::getNumOfOutputs | ( | ) |
Return number of final outputs.
Definition at line 385 of file Cartesian.cpp.
uint cart::Cartesian::getNumOfRows | ( | ) |
Return number of rows in genotype.
Definition at line 400 of file Cartesian.cpp.
uint cart::Cartesian::getNumVars | ( | ) |
Return number of variables - inputs to be replaced by elements from domain in evaluation process.
Definition at line 415 of file Cartesian.cpp.
|
virtual |
Initialize a genotype object (read parameters, perform sanity check, build data)
Implements Genotype.
Definition at line 17 of file Cartesian.cpp.
void cart::Cartesian::makeGenotype | ( | ) |
Make random genotype by using rules of choosing input connections, outputs and functions in order to make valid genotype.
Definition at line 310 of file Cartesian.cpp.
void cart::Cartesian::printGenotype | ( | ) |
Print genotype on standard output.
Definition at line 363 of file Cartesian.cpp.
uint cart::Cartesian::randFunction | ( | ) |
Return random unsigned integer defining function by refering to rules for creating valid genotype.
Definition at line 353 of file Cartesian.cpp.
uint cart::Cartesian::randInputConn | ( | uint | currCol | ) |
Return random unsigned integer for input connection by refering to rules for creating valid genotype and current column (in which current node is placed).
Definition at line 333 of file Cartesian.cpp.
uint cart::Cartesian::randOutput | ( | ) |
Return random unsigned integer for final output by refering to rules for creating valid genotype.
Definition at line 346 of file Cartesian.cpp.
|
virtual |
|
virtual |
Register genotype's parameters (called before Genotype::initialize)
Reimplemented from Genotype.
Definition at line 263 of file Cartesian.cpp.
|
virtual |
|
protected |
number of columns
Definition at line 125 of file Cartesian_c.h.
|
protected |
all possible constants
Definition at line 129 of file Cartesian_c.h.
FunctionSetP cart::Cartesian::funcSet |
function nodes
Definition at line 116 of file Cartesian_c.h.
|
protected |
number of input connections
Definition at line 123 of file Cartesian_c.h.
|
protected |
number of primary inputs
Definition at line 121 of file Cartesian_c.h.
|
protected |
levels back parameter
Definition at line 126 of file Cartesian_c.h.
|
protected |
number of functions
Definition at line 128 of file Cartesian_c.h.
|
protected |
number of variables
Definition at line 127 of file Cartesian_c.h.
|
protected |
number of final outputs
Definition at line 122 of file Cartesian_c.h.
|
protected |
number of rows
Definition at line 124 of file Cartesian_c.h.
|
protected |
local copy of state
Definition at line 119 of file Cartesian_c.h.