#include <problem.h>
|
| | problem (std::size_t, const interval< double > &) |
| | problem (const std::vector< interval< double > > &) |
| std::size_t | parameters () const noexcept |
| template<symbol_set::weight_t = symbol_set::default_weight> |
| real * | insert (const interval< double > &, symbol::category_t=symbol::undefined_category) |
template<Symbol S, symbol_set::weight_t = symbol_set::default_weight, class ... Args>
requires std::constructible_from<S, Args...> |
| std::add_pointer_t< S > | insert (Args &&...) |
|
template<std::derived_from< function > F, symbol_set::weight_t W = symbol_set::default_weight, std::convertible_to< symbol::category_t > C = symbol::category_t> |
| std::add_pointer_t< F > | insert (symbol::category_t, std::initializer_list< C >) |
|
template<std::derived_from< function > F, symbol_set::weight_t W = symbol_set::default_weight, std::convertible_to< symbol::category_t > C = symbol::category_t> |
| std::add_pointer_t< F > | insert (std::initializer_list< C >) |
| virtual bool | is_valid () const |
Provides a DE-specific interface to the generic problem class.
The class is a facade that provides a simpler interface to represent DE-specific problems.
- Examples
- rastrigin.cc, and scheduling.cc.
◆ problem() [1/2]
| ultra::de::problem::problem |
( |
std::size_t | nparam, |
|
|
const interval< double > & | itval ) |
Sets up a DE problem for which a solution has the given number of (uniform, same range) parameters.
- Parameters
-
| [in] | nparam | number of parameters (aka genes in the chromosome) |
| [in] | itval | a half-open interval (the value of each parameter falls within this range) |
The typical solution of a numerical optimization problem can often be represented as a sequence of real numbers in a given range (and this is the raison d'etre of this constructor).
◆ problem() [2/2]
| ultra::de::problem::problem |
( |
const std::vector< interval< double > > & | intervals | ) |
|
|
explicit |
Sets up a DE problem for which a solution has the given number of (uniform but not same range) parameters.
- Parameters
-
| [in] | intervals | a sequence of half-open intervals (one for each parameter) |
This is a more flexible form of the other constructor. Each parameter has its own range.
◆ insert()
template<symbol_set::weight_t W>
Adds a de::real terminal to the internal symbol set.
- Parameters
-
| [in] | itval | the half open interval for the real terminal |
| [in] | category | an optional category |
- Returns
- a raw pointer to the symbol just added (or nullptr in case of error)
◆ parameters()
| std::size_t ultra::de::problem::parameters |
( |
| ) |
const |
|
nodiscardnoexcept |
- Returns
- genome size / number of parameters / elements in the container
The documentation for this class was generated from the following files: