35template <
typename Signature>
44template <
typename Value,
typename Variable>
65 template <base::concepts::invocable_as<Value(Variable)> Function>
68 : function_(
std::forward<Function>(function)) {}
76 template <base::concepts::invocable_as<Value(Variable)> Function>
79 function_ = std::forward<Function>(function);
89 value_ = function_(variable);
103 std::function<Value(Variable)> function_{};
auto value() const noexcept -> const value_type &
Get function value.
any_objective_function(Function &&function)
Constructor.
std::decay_t< Variable > variable_type
Type of variables.
void evaluate_on(const variable_type &variable)
Evaluate function value on a variable.
auto operator=(Function &&function) -> any_objective_function &
Assign a function object.
any_objective_function()=default
Constructor.
std::decay_t< Value > value_type
Type of function values.
Class to store any type of objects of objective functions.
Definition of invocable_as concept.
Namespace of optimization algorithms.