ECF 1.5
Node.h
1#ifndef Node_h
2#define Node_h
3#include <vector>
4#include "Primitive.h"
5
6
7namespace Tree
8{
9
10class Node;
11typedef boost::shared_ptr<Node> NodeP;
12
19class Node
20{
21public:
22 Node();
23 Node(PrimitiveP primitive);
24 Node(NodeP node);
25 ~Node(void);
26 void setPrimitive(PrimitiveP primitive);
27
28 uint size_;
29 uint depth_;
30 PrimitiveP primitive_;
31};
32typedef boost::shared_ptr<Node> NodeP;
33}
34
35#endif
Node base class (Tree genotype)
Definition: Node.h:20
void setPrimitive(PrimitiveP primitive)
Set the primitive this node points to (when creating a new tree node). In case of an ephemereal rando...
Definition: Node.cpp:46
PrimitiveP primitive_
pointer to the Primitive belonging to this node
Definition: Node.h:30
uint size_
size of the subtree of this node (including the node)
Definition: Node.h:28
uint depth_
depth of this node
Definition: Node.h:29
Definition: nodes.h:92