Public Member Functions | Public Attributes | Protected Attributes

cart::Cartesian Class Reference

Inheritance diagram for cart::Cartesian:
Genotype

List of all members.

Public Member Functions

bool initialize (StateP state)
Cartesiancopy ()
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 Attributes

FunctionSetP funcSet
 function nodes

Protected Attributes

StateP state_
 local copy of state
uint inputs
 number of primary inputs
uint outputs
 number of final outputs
uint inputConns
 number of input connections
uint rows
 number of rows
uint cols
 number of columns
uint levelsBack
 levels back parameter
uint numVars
 number of variables
uint numFunc
 number of functions
voidP constantset
 all possible constants

Detailed Description

Definition at line 14 of file Cartesian_c.h.


Member Function Documentation

Cartesian * cart::Cartesian::copy (  )  [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.

vector< CrossoverOpP > cart::Cartesian::getCrossoverOp (  )  [virtual]

Create and return a vector of crossover operators

Reimplemented from Genotype.

Definition at line 249 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.

vector< MutationOpP > cart::Cartesian::getMutationOp (  )  [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.

bool cart::Cartesian::initialize ( StateP  state  )  [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.

void cart::Cartesian::read ( XMLNode &  xCart  )  [virtual]

Read genotype data from XMLNode

Implements Genotype.

Definition at line 277 of file Cartesian.cpp.

void cart::Cartesian::registerParameters ( StateP  state  )  [virtual]

Register genotype's parameters (called before Genotype::initialize)

Reimplemented from Genotype.

Definition at line 263 of file Cartesian.cpp.

void cart::Cartesian::write ( XMLNode &  xCart  )  [virtual]

Write genotype data to XMLNode

Implements Genotype.

Definition at line 281 of file Cartesian.cpp.


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