22#include <Eigen/Cholesky>
56 Eigen::MatrixX<typename ObjectiveFunction::value_type>,
57 typename ObjectiveFunction::variable_type>
59 Eigen::LLT<Eigen::MatrixX<typename ObjectiveFunction::value_type>>>
62 bfgs_optimizer<ObjectiveFunction, LineSearcher, HessianSolver>,
109 const auto dimensions = init_variable.size();
142 iteration_logger.template append<index_type>(
144 iteration_logger.template append<index_type>(
146 iteration_logger.template append<value_type>(
148 iteration_logger.template append<value_type>(
Definition of backtracking_line_searcher class.
Class to write logs of iterations.
Class of tags of logs without memory management.
Class to perform backtracking line search.
Class of quasi-Newton method with Broyden-Fletcher-Goldfarb-Shanno (BFGS) formula.
typename variable_type::Scalar variable_scalar_type
Type of scalars in variables.
auto gradient() const -> const variable_type &
Get gradient for current optimal variable.
auto opt_variable() const -> const variable_type &
Get current optimal variable.
variable_type prev_grad_
Previous gradient.
variable_type diff_var_
Difference of variable.
HessianSolver hessian_solver_type
Type of solvers of linear equation of Hessian.
auto calc_direction() -> variable_type
Calculate search direction.
hessian_type approx_hessian_
Approximate Hessian.
typename objective_function_type::variable_type variable_type
Type of variables.
typename hessian_solver_type::MatrixType hessian_type
Type of Hessian.
variable_type diff_grad_
Difference of gradient.
void configure_iteration_logger(logging::iterations::iteration_logger< this_type > &iteration_logger) const
Configure an iteration logger.
void init(const variable_type &init_variable)
Initialize.
variable_type prev_var_
Previous variable.
typename line_searcher_type::objective_function_type objective_function_type
Type of the objective function.
hessian_solver_type solver_
Solver of linear equation of Hessian.
bool has_first_iteration_done_
Whether the first iteration has been done.
bfgs_optimizer(const objective_function_type &obj_fun=objective_function_type())
Constructor.
variable_type hessian_var_
approx_hessian_ * diff_var_
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.
typename objective_function_type::variable_type variable_type
Type of variables.
void init(const variable_type &init_variable)
Initialize.
auto evaluations() const noexcept -> index_type
Get the number of function evaluations.
typename line_searcher_type::objective_function_type objective_function_type
Type of the objective function.
auto gradient_norm() const -> value_type
Calculate norm of gradient.
auto opt_value() const -> const value_type &
Get current optimal value.
auto line_searcher() -> line_searcher_type &
Access object to perform line search.
Concept of Eigen's solvers of linear equations.
Concept of objects to perform line search in optimization.
Concept of multi-variate first-order differentiable objective functions in optimization.
Definition of descent_method_base class.
Definition of eigen_solver_of concept.
Definition of index_type type.
Definition of iteration_logger class.
Definition of line_searcher concept.
Definition of log_tag_view class.
Definition of multi_variate_differentiable_objective_function concept.
Namespace of optimization algorithms.
constexpr auto bfgs_optimizer_tag
Tag of bfgs_optimizer.