1#include "GPSymbRegEvalOp.h"
9 if (!calculateBoundsIfRootNode(result, tree)) {
19 IAPrimitiveP prim1 = boost::dynamic_pointer_cast<IAPrimitive>(tree[tree.
iNode_]->primitive_);
21 IABounds bounds1 = prim1->calculateBounds(tree);
23 if (!bounds1.isWithinBounds) {
30 IAPrimitiveP prim2 = boost::dynamic_pointer_cast<IAPrimitive>(tree[tree.
iNode_]->primitive_);
32 IABounds bounds2 = prim2->calculateBounds(tree);
34 if (!bounds2.isWithinBounds) {
40 retVal.isWithinBounds =
true;
41 retVal.isLowerBoundInclusive = bounds1.isLowerBoundInclusive && bounds2.isUpperBoundInclusive;
42 retVal.lowerBound = bounds1.lowerBound - bounds2.upperBound;
43 retVal.isUpperBoundInclusive = bounds1.isUpperBoundInclusive && bounds2.isLowerBoundInclusive;
44 retVal.upperBound = bounds1.upperBound - bounds2.lowerBound;
virtual void execute(void *result, Tree::Tree &tree)
Execute the primitive.
void execute(void *result, Tree &tree)
Execute the primitive.
Tree class - implements genotype as a tree.
uint iNode_
current node index (when parsing the tree)