ECF 1.5
Public Member Functions | Public Attributes | List of all members
Tree::Node Class Reference

Node base class (Tree genotype) More...

#include <Node.h>

Public Member Functions

 Node (PrimitiveP primitive)
 Create a copy of an existing Node with its Primitive pointer. The associated primitive (pointer) is copied. More...
 
 Node (NodeP node)
 Create a copy of an existing Node. The associated primitive (pointer) is copied. More...
 
void setPrimitive (PrimitiveP primitive)
 Set the primitive this node points to (when creating a new tree node). In case of an ephemereal random constant primitive, new primitive object is created. More...
 

Public Attributes

uint size_
 size of the subtree of this node (including the node) More...
 
uint depth_
 depth of this node More...
 
PrimitiveP primitive_
 pointer to the Primitive belonging to this node More...
 

Detailed Description

Node base class (Tree genotype)

A node is an element of a Tree. Each node points to a Primitive object.

Definition at line 19 of file Node.h.

Constructor & Destructor Documentation

◆ Node() [1/3]

Tree::Node::Node ( void  )

Definition at line 9 of file Node.cpp.

◆ Node() [2/3]

Tree::Node::Node ( PrimitiveP  primitive)

Create a copy of an existing Node with its Primitive pointer. The associated primitive (pointer) is copied.

Definition at line 31 of file Node.cpp.

◆ Node() [3/3]

Tree::Node::Node ( NodeP  node)

Create a copy of an existing Node. The associated primitive (pointer) is copied.

Definition at line 19 of file Node.cpp.

◆ ~Node()

Tree::Node::~Node ( void  )

Definition at line 38 of file Node.cpp.

Member Function Documentation

◆ setPrimitive()

void Tree::Node::setPrimitive ( PrimitiveP  primitive)

Set the primitive this node points to (when creating a new tree node). In case of an ephemereal random constant primitive, new primitive object is created.

Definition at line 46 of file Node.cpp.

Member Data Documentation

◆ depth_

uint Tree::Node::depth_

depth of this node

Definition at line 29 of file Node.h.

◆ primitive_

PrimitiveP Tree::Node::primitive_

pointer to the Primitive belonging to this node

Definition at line 30 of file Node.h.

◆ size_

uint Tree::Node::size_

size of the subtree of this node (including the node)

Definition at line 28 of file Node.h.


The documentation for this class was generated from the following files: