ECF 1.5
IAConstTerminal.cpp
1#include "GPSymbRegEvalOp.h"
2
3#include "IATree.h"
4#include "IAConstTerminal.h"
5#include <cmath>
6
7void IAConstTerminal::execute(void* result, Tree::Tree& tree)
8{
9 if (!calculateBoundsIfRootNode(result, tree)) {
10 return;
11 }
12
14}
15
16IABounds IAConstTerminal::calculateBounds(Tree::IATree& tree) {
17 IABounds retVal;
18 double val;
19 this->getValue(&val);
20
21 retVal.isWithinBounds = true;
22 retVal.isLowerBoundInclusive = true;
23 retVal.lowerBound = val;
24 retVal.isUpperBoundInclusive = true;
25 retVal.upperBound = val;
26 return retVal;
27}
virtual void execute(void *result, Tree::Tree &tree)
Execute the primitive.
void execute(void *result, Tree &tree)
Execute the primitive.
Definition: Terminal.h:64
void getValue(void *value)
Get terminal's value.
Definition: Terminal.h:57
Tree class - implements genotype as a tree.
Definition: Tree_c.h:29