![]() |
ECF 1.5
|
Ephemereal random constant (ERC) node of type double (Tree genotype). More...
#include <Terminal.h>
Public Member Functions | |
| bool | initialize (StateP state) |
| Initialize the primitive (default just sets the StateP pointer). More... | |
| PrimitiveP | assignToNode (PrimitiveP primitive) |
| Assign primitive to node (when building a tree). The default behaviour just returns the same pointer (common primitives). ERC's should override and generate a new object with a new value. More... | |
Public Member Functions inherited from Tree::Primitives::ERC< double > | |
| bool | initialize (StateP state) |
| Initialize ERC value(s). More... | |
| void | execute (void *result, Tree &tree) |
| Execute the primitive. More... | |
| void | setValue (void *value) |
| Set terminal's value. More... | |
| void | getValue (void *value) |
| Get terminal's value. More... | |
| PrimitiveP | copyWithNode (PrimitiveP primitive) |
| Copy primitive (when copying a node, e.g. in crossover). The default behaviour just returns the same pointer (common primitives). (ERC's should override and make a new copy of the original object). More... | |
| PrimitiveP | assignToNode (PrimitiveP primitive) |
| Create (or choose) new unique ERC value and assign to tree node. More... | |
Public Member Functions inherited from Tree::Primitives::Primitive | |
| virtual void | execute (void *result, Tree &tree)=0 |
| Execute the primitive. More... | |
| virtual bool | initialize (StateP state) |
| Initialize the primitive (default just sets the StateP pointer). More... | |
| virtual void | setValue (void *value) |
| virtual void | getValue (void *value) |
| virtual PrimitiveP | copyWithNode (PrimitiveP) |
| Copy primitive (when copying a node, e.g. in crossover). The default behaviour just returns the same pointer (common primitives). (ERC's should override and make a new copy of the original object). More... | |
| virtual PrimitiveP | assignToNode (PrimitiveP) |
| Assign primitive to node (when building a tree). The default behaviour just returns the same pointer (common primitives). ERC's should override and generate a new object with a new value. More... | |
| void | getNextArgument (void *result, Tree &tree) |
| Execute next child node's primitive (execute next subtree). More... | |
| void | skipNextArgument (Tree &tree) |
| Skip next child subtree (doesn't execute the subtree). More... | |
| int | getNumberOfArguments () |
| Return primitive's number of arguments. More... | |
| void | setName (std::string name) |
| Set primitive's name. More... | |
| std::string | getName () |
| Get primitive's name. More... | |
| std::string | getComplementName () |
| Get complement's name. More... | |
Protected Attributes | |
| bool | useInterval_ |
Protected Attributes inherited from Tree::Primitives::ERC< double > | |
| std::vector< double > * | values_ |
Protected Attributes inherited from Tree::Primitives::Primitive | |
| std::string | name_ |
| int | nArguments_ |
| std::string | complementName_ |
Additional Inherited Members | |
Public Attributes inherited from Tree::Primitives::ERC< double > | |
| std::string | baseName_ |
| double | value_ |
Public Attributes inherited from Tree::Primitives::Primitive | |
| StateP | state_ |
Ephemereal random constant (ERC) node of type double (Tree genotype).
Possible values may be defined in the configuration with the interval [x y] or with a set {a b c ...}
Definition at line 188 of file Terminal.h.
|
inlinevirtual |
Assign primitive to node (when building a tree). The default behaviour just returns the same pointer (common primitives). ERC's should override and generate a new object with a new value.
| sptr | to this primitive |
Reimplemented from Tree::Primitives::Primitive.
Definition at line 214 of file Terminal.h.
|
inlinevirtual |
Initialize the primitive (default just sets the StateP pointer).
Reimplemented from Tree::Primitives::Primitive.
Definition at line 191 of file Terminal.h.
|
protected |
Definition at line 236 of file Terminal.h.