![]() |
Ultra 0.9.4
|
#include <primitive.h>
Public Member Functions | |
| real (const interval< double > &i={-1000.0, 1000.0}, symbol::category_t c=symbol::undefined_category) | |
| constexpr double | min () const noexcept |
| constexpr double | sup () const noexcept |
| value_t | instance () const final |
| Public Member Functions inherited from ultra::terminal | |
| std::string | to_string (format=c_format) const override |
| symbol (const std::string &, category_t=default_category) | |
| Public Member Functions inherited from ultra::symbol | |
| symbol (const std::string &, category_t=default_category) | |
| virtual | ~symbol ()=default |
| Virtual destructor to allow safe polymorphic deletion. | |
| category_t | category () const noexcept |
| opcode_t | opcode () const noexcept |
| const std::string & | name () const noexcept |
| void | category (category_t) noexcept |
| virtual bool | is_valid () const |
Additional Inherited Members | |
| Public Types inherited from ultra::symbol | |
| enum | format { c_format , cpp_format , python_format , sup_format } |
| Supported rendering formats for symbol stringification. | |
| using | category_t = unsigned |
| using | opcode_t = unsigned |
| Static Public Attributes inherited from ultra::symbol | |
| static constexpr category_t | default_category = 0 |
| Default category assigned when typing is not used. | |
| static constexpr category_t | undefined_category |
| Sentinel value indicating that the category has not yet been assigned. | |
A real number within a range.
While many genetic algorithms use integers to approximate continuous parameters, the choice limits the resolution with which an optimum can be located. Floating point not only uses computer resources efficiently, it also makes input and output transparent for the user. Parameters can be input, manipulated and output as ordinary floating-point numbers without ever being reformatted as genes with a different binary representation.
|
inlineexplicit |
| [in] | i | a half open interval |
| [in] | c | an optional category |
|
inlinenodiscardfinalvirtual |
Produce the runtime value of the terminal.
This function returns the value represented by the terminal when the program is evaluated. The returned value may depend on the evaluation context (e.g. the current input vector), but does not depend on any child expressions.
Implements ultra::terminal.