1#include "../ECF_base.h"
16Primitive::~Primitive()
42void Primitive::setValue(
void* value)
48void Primitive::getValue(
void* value)
74 tree[tree.iNode_]->primitive_->execute(result, tree);
84 tree.iNode_ += tree[tree.iNode_ + 1]->size_;
120 return complementName_;
virtual PrimitiveP copyWithNode(PrimitiveP)
Copy primitive (when copying a node, e.g. in crossover). The default behaviour just returns the same ...
std::string getName()
Get primitive's name.
int getNumberOfArguments()
Return primitive's number of arguments.
void skipNextArgument(Tree &tree)
Skip next child subtree (doesn't execute the subtree).
std::string getComplementName()
Get complement's name.
void getNextArgument(void *result, Tree &tree)
Execute next child node's primitive (execute next subtree).
virtual bool initialize(StateP state)
Initialize the primitive (default just sets the StateP pointer).
void setName(std::string name)
Set primitive's name.
virtual PrimitiveP assignToNode(PrimitiveP)
Assign primitive to node (when building a tree). The default behaviour just returns the same pointer ...
Tree class - implements genotype as a tree.