Vita
|
A specialization of the core_interpreter class. More...
#include <interpreter.h>
Inherits vita::core_interpreter.
Public Member Functions | |
value_t | fetch_arg (unsigned) final |
Fetches the value of the i -th argument of the current gene. More... | |
index_t | fetch_index (unsigned) const |
value_t | fetch_opaque_arg (unsigned) final |
Fetches a specific input parameter without assuming referential transparency. More... | |
terminal_param_t | fetch_param () const final |
interpreter (const i_mep *) | |
const i_mep & | program () const |
Public Member Functions inherited from vita::core_interpreter | |
bool | is_valid () const |
double | penalty () |
value_t | run () |
Public Member Functions inherited from vita::symbol_params | |
virtual value_t | fetch_arg (unsigned)=0 |
Fetches a specific input parameter assuming referential transparency. More... | |
virtual value_t | fetch_opaque_arg (unsigned)=0 |
Fetches a specific input parameter without assuming referential transparency. More... | |
virtual terminal_param_t | fetch_param () const =0 |
virtual value_t | fetch_var (unsigned) |
value_t | operator[] (unsigned i) |
Equivalent to fetch_arg(). More... | |
A specialization of the core_interpreter class.
Definition at line 42 of file mep/interpreter.h.
|
explicit |
[in] | ind | individual whose value we are interested in |
ind
must extend beyond that of the interpreter. Definition at line 25 of file interpreter.cc.
|
finalvirtual |
Fetches the value of the i
-th argument of the current gene.
[in] | i | i-th argument of the current gene |
We use a cache to avoid recalculating the same value during the same interpreter execution. This means that side effects are not evaluated to date: WE ASSUME REFERENTIAL TRANSPARENCY for all the expressions.
Implements vita::symbol_params.
Definition at line 81 of file interpreter.cc.
index_t vita::interpreter< i_mep >::fetch_index | ( | unsigned | i | ) | const |
[in] | i | i -th argument of the current function |
i
-th argument of the current function Definition at line 128 of file interpreter.cc.
|
finalvirtual |
Fetches a specific input parameter without assuming referential transparency.
Implements vita::symbol_params.
Definition at line 106 of file interpreter.cc.
|
finalvirtual |
Implements vita::symbol_params.
Definition at line 58 of file interpreter.cc.
|
inline |
Definition at line 49 of file mep/interpreter.h.