13#if !defined(VITA_GA_PRIMITIVE_H)
14#define VITA_GA_PRIMITIVE_H
63 Expects(r.first < r.second);
66 bool parametric()
const final {
return true; }
68 terminal_param_t init()
const override {
return random::in(range_); }
70 std::string display(terminal_param_t v, format)
const override
71 {
return std::to_string(
static_cast<T
>(v)); }
100 : detail::number<double>(
"REAL", r, i)
112 : detail::number<int>(
"INTEGER", r, i)
Mainly used for differential evolution.
An interface for parameter passing to functions / terminals.
A symbol with zero-arity.
std::pair< T, T > range_t
Right-open interval.
std::size_t category_t
A category provide operations which supplement or supersede those of the domain but which are restric...
D_DOUBLE number
This is the return type of the src_interpreter::run method.
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 ...
terminal_param_t base_t
We assume that errors during floating-point operations aren't terminal error.