Ephemereal random constant (ERC) node class (Tree genotype). More...
#include <Terminal.h>
Public Member Functions | |
| bool | initialize (StateP state) |
| Initialize ERC value(s). Read given values from config and store in vector. | |
| void | execute (void *result, Tree &tree) |
| Execute the primitive. | |
| void | setValue (void *value) |
| Set terminal's value. | |
| void | getValue (void *value) |
| Get terminal's value. | |
| PrimitiveP | copyWithNode (PrimitiveP primitive) |
| Copy primitive (when copying a node). The default behaviour just returns the same pointer (common primitives). (ERC's should make a new object). | |
| PrimitiveP | assignToNode (PrimitiveP primitive) |
| Create (or choose) new unique ERC value and assign to tree node. | |
Public Attributes | |
| std::string | baseName_ |
| T | value_ |
Protected Attributes | |
| std::vector< T > * | values_ |
Ephemereal random constant (ERC) node class (Tree genotype).
ERC represents a single value (of type double by default) that can assume values from the interval or from the set. ERC's value is defined once - when assigning to a node in a new tree. Only double-typed ERC's may change value with Gaussian mutation.
Definition at line 80 of file Terminal.h.
| PrimitiveP Tree::Primitives::ERC< T >::assignToNode | ( | PrimitiveP | primitive | ) | [inline, virtual] |
Create (or choose) new unique ERC value and assign to tree node.
| pointer | to destination |
Reimplemented from Tree::Primitives::Primitive.
Reimplemented in Tree::Primitives::ERCD.
Definition at line 155 of file Terminal.h.
| PrimitiveP Tree::Primitives::ERC< T >::copyWithNode | ( | PrimitiveP | primitive | ) | [inline, virtual] |
Copy primitive (when copying a node). The default behaviour just returns the same pointer (common primitives). (ERC's should make a new object).
| sptr | to this primitive |
Reimplemented from Tree::Primitives::Primitive.
Definition at line 146 of file Terminal.h.
| void Tree::Primitives::ERC< T >::execute | ( | void * | result, | |
| Tree & | tree | |||
| ) | [inline, virtual] |
Execute the primitive.
Function primitives gather arguments and return a value; terminal primitives return current value.
Implements Tree::Primitives::Primitive.
Definition at line 119 of file Terminal.h.
| void Tree::Primitives::ERC< T >::getValue | ( | void * | value | ) | [inline, virtual] |
Get terminal's value.
| pointer | to destination |
Reimplemented from Tree::Primitives::Primitive.
Definition at line 140 of file Terminal.h.
| void Tree::Primitives::ERC< T >::setValue | ( | void * | value | ) | [inline, virtual] |
Set terminal's value.
| value | pointer to new value |
Reimplemented from Tree::Primitives::Primitive.
Definition at line 130 of file Terminal.h.
1.7.1