13#if !defined(VITA_SYMBOL_H)
39 enum format {c_format, cpp_format, mql_format, python_format, sup_format};
44 virtual unsigned arity()
const = 0;
45 virtual bool input()
const;
53 [[nodiscard]] std::string
name()
const;
88 return penalty_nvi(ci);
113 Expects(category_ == undefined_category);
114 Expects(c != category_);
Minimum interface of an interpreter.
An interface for parameter passing to functions / terminals.
Together functions and terminals are referred to as symbols.
virtual bool is_valid() const
format
Symbol rendering format.
double penalty(core_interpreter *) const
Used for automatic calculation of penalities due to broken constraints.
opcode_t opcode() const
An opcode is a unique, numerical session ID for a symbol.
virtual bool input() const
An input variable is a feature from the learning domain.
category_t category() const
The type (a.k.a.
virtual value_t eval(symbol_params &) const =0
Calculates the value of / performs the action associated with the symbol (it's implementation specifi...
symbol(const std::string &, category_t=0)
The main namespace for the project.
std::size_t category_t
A category provide operations which supplement or supersede those of the domain but which are restric...
std::variant< D_VOID, D_INT, D_DOUBLE, D_STRING > value_t
A variant containing the data types used by the interpreter for internal calculations / output value ...
unsigned opcode_t
This is the type used as key for symbol identification.