#include <interpreter.h>
This class extends ultra::interpreter to manage input variables.
For further details see ultra::src::variable class.
◆ interpreter()
- Parameters
-
| [in] | prg | individual whose value we are interested in |
- Warning
- The lifetime of prg must extend beyond that of the interpreter.
◆ fetch_var()
| value_t ultra::src::interpreter::fetch_var |
( |
std::size_t | i | ) |
const |
|
nodiscard |
Used by the ultra::variable class to retrieve the value of a variable.
- Parameters
-
| [in] | i | the index of a variable |
- Returns
- the value of the i-th variable
◆ run()
| value_t ultra::src::interpreter::run |
( |
const std::vector< value_t > & | ex | ) |
|
Calculates the output of a program (individual) given a specific input.
- Parameters
-
| [in] | ex | a vector of values for the problem's variables |
- Returns
- the output value of the interpreter
The documentation for this class was generated from the following files: