Class LBFGS#

Inheritance Relationships#

Base Type#

Class Documentation#

class LBFGS : public pele::GradientOptimizer#

An implementation of the LBFGS optimization algorithm in c++.

This Implementation uses a backtracking linesearch.

Public Functions

LBFGS(
std::shared_ptr<pele::BasePotential> potential,
const pele::Array<double> x0,
double tol = 1e-4,
int M = 4,
bool save_trajectory = false,
int iterations_before_save = 1,
StopCriterionType stop_criterion = StopCriterionType::GRADIENT
)#

Constructor.

inline virtual ~LBFGS()#

Destructor.

virtual void one_iteration()#

Do one iteration iteration of the optimization algorithm.

inline void set_H0(double H0)#
inline void set_max_f_rise(double max_f_rise)#
inline void set_use_relative_f(int use_relative_f)#
inline double get_H0() const#
inline Array<double> get_s() const#

The LBFGS memory, for restarting the optimizer at new coordinates without losing the curvature information (see set_state).

inline Array<double> get_y() const#
inline Array<double> get_rho() const#
inline int get_k() const#
inline void set_state(
Array<double> const &s,
Array<double> const &y,
Array<double> const &rho,
double H0,
int k
)#

Restore the LBFGS memory saved from an LBFGS with the same size and M.

virtual void reset(pele::Array<double> &x0)#

reset the lbfgs optimizer to start a new minimization from x0

H0 is not reset because the current value of H0 is probably better than the input value. You can use set_H0() to change H0.