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 236 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 356 of file Cartesian.cpp.

voidP cart::Cartesian::getConstantNames (  ) 

Return all possible constant names.

Definition at line 393 of file Cartesian.cpp.

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

Create and return a vector of crossover operators

Reimplemented from Genotype.

Definition at line 247 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 408 of file Cartesian.cpp.

vector< MutationOpP > cart::Cartesian::getMutationOp (  )  [virtual]

Create and return a vector of mutation operators

Reimplemented from Genotype.

Definition at line 254 of file Cartesian.cpp.

uint cart::Cartesian::getNumOfCols (  ) 

Return number of columns in genotype.

Definition at line 403 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 388 of file Cartesian.cpp.

uint cart::Cartesian::getNumOfInputs (  ) 

Return number of primary inputs.

Definition at line 378 of file Cartesian.cpp.

uint cart::Cartesian::getNumOfOutputs (  ) 

Return number of final outputs.

Definition at line 383 of file Cartesian.cpp.

uint cart::Cartesian::getNumOfRows (  ) 

Return number of rows in genotype.

Definition at line 398 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 413 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 15 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 308 of file Cartesian.cpp.

void cart::Cartesian::printGenotype (  ) 

Print genotype on standard output.

Definition at line 361 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 351 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 331 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 344 of file Cartesian.cpp.

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

Read genotype data from XMLNode

Implements Genotype.

Definition at line 275 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 261 of file Cartesian.cpp.

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

Write genotype data to XMLNode

Implements Genotype.

Definition at line 279 of file Cartesian.cpp.


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