4#include "ecf/tree/Terminal.h"
5#include "ecf/tree/Primitive.h"
6#include "IAPrimitive.h"
14 Tree::PrimitiveP assignToNode(Tree::PrimitiveP primitive)
21 double r = state_->getRandomizer()->getRandomDouble();
22 erc->value_ = (*values_)[0] + r * ((*values_)[1] - (*values_)[0]);
26 uint iData = state_->getRandomizer()->getRandomInteger((
int)
values_->size());
27 erc->value_ =
values_->at(iData);
29 std::ostringstream ss;
32 return (Tree::PrimitiveP) erc;
36typedef boost::shared_ptr<IAERCD> IAERCDP;
virtual void execute(void *result, Tree::Tree &tree)
Execute the primitive.
Ephemereal random constant (ERC) node of type double (Tree genotype).
std::vector< double > * values_
void setName(std::string name)
Set primitive's name.
Tree class - implements genotype as a tree.