The main data structure to store the AST that represents a program in the current generation.
More...
#include <program.h>
The main data structure to store the AST that represents a program in the current generation.
◆ program() [1/2]
cuml::genetic::program::program |
( |
| ) |
|
|
explicit |
the AST. It is stored in the reverse of DFS-right-child-first order. In other words, construct a regular AST in the form of depth-first, but instead of storing the left child first, store the right child and so on. Now take the resulting 1D array and reverse it.
- Note
- The pointed memory buffer is NOT owned by this class and further it is assumed to be a zero-copy (aka pinned memory) buffer, at least in this initial version Default constructor
◆ ~program()
cuml::genetic::program::~program |
( |
| ) |
|
Destroy the program object.
◆ program() [2/2]
cuml::genetic::program::program |
( |
const program & |
src | ) |
|
|
explicit |
Copy constructor for a new program object.
- Parameters
-
◆ operator=()
assignment operator
- Parameters
-
[in] | src | source program to be copied |
- Returns
- current program reference
◆ depth
int cuml::genetic::program::depth |
maximum depth of this AST
◆ len
int cuml::genetic::program::len |
total number of nodes in this AST
◆ metric
fitness metric used for current AST
◆ mut_type
mutation type responsible for production
◆ nodes
node* cuml::genetic::program::nodes |
◆ raw_fitness_
float cuml::genetic::program::raw_fitness_ |
fitness score of current AST
The documentation for this struct was generated from the following file: