35template <
typename Derived, concepts::line_searcher LineSearcher>
43 typename line_searcher_type::objective_function_type;
49 using value_type =
typename objective_function_type::value_type;
67 return derived().calc_direction();
auto derived() noexcept -> Derived &
Access derived object.
Class of tags of logs without memory management.
Base class of implementations of descent methods for optimization.
typename objective_function_type::value_type value_type
Type of function values.
auto gradient() const -> const variable_type &
Get gradient for current optimal variable.
auto opt_variable() const -> const variable_type &
Get current optimal variable.
auto iterations() const noexcept -> index_type
Get the number of iterations.
auto is_stop_criteria_satisfied() const -> bool
Determine if stopping criteria of the algorithm are satisfied.
auto tol_gradient_norm(const value_type &value) -> Derived &
Set tolerance of norm of gradient.
descent_method_base(logging::log_tag_view tag, const objective_function_type &obj_fun=objective_function_type())
Constructor.
value_type tol_grad_norm_
Tolerance of norm of gradient.
auto calc_direction() -> variable_type
Calculate search direction.
typename objective_function_type::variable_type variable_type
Type of variables.
line_searcher_type line_searcher_
Object to perform line search.
void init(const variable_type &init_variable)
Initialize.
auto evaluations() const noexcept -> index_type
Get the number of function evaluations.
void iterate()
Iterate the algorithm once.
index_type iterations_
Number of iterations.
typename line_searcher_type::objective_function_type objective_function_type
Type of the objective function.
static const auto default_tol_grad_norm
Default tolerance of norm of gradient.
auto gradient_norm() const -> value_type
Calculate norm of gradient.
LineSearcher line_searcher_type
Type of class to perform line search.
auto line_searcher() const -> const line_searcher_type &
Access object to perform line search.
auto opt_value() const -> const value_type &
Get current optimal value.
auto line_searcher() -> line_searcher_type &
Access object to perform line search.
Base class of implementations of optimization algorithms.
Definition of index_type type.
Definition of line_searcher concept.
Definition of log_tag_view class.
std::ptrdiff_t index_type
Type of indices in this library.
Namespace of optimization algorithms.
Definition of optimizer_base class.