iterative-solver 0.0
molpro::linalg::itsolv::OptimizeBFGS< R, Q, P > Class Template Reference

A class that optimises a function using a Quasi-Newton or other method. More...

#include <OptimizeBFGS.h>

Inheritance diagram for molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >:
Collaboration diagram for molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >:

Detailed Description

template<class R, class Q = R, class P = std::map<size_t, typename R::value_type>>
class molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >

A class that optimises a function using a Quasi-Newton or other method.

Template Parameters
RThe class encapsulating solution and residual vectors
QUsed internally as a class for storing vectors on backing store

Public Types

using SolverTemplate = IterativeSolverTemplate< Optimize, R, Q, P >
 
using SubspaceSolver = subspace::SubspaceSolverOptBFGS< R, Q, P >
 
- Public Types inherited from molpro::linalg::itsolv::IterativeSolver< R, R, std::map< size_t, typename R::value_type > >
using value_type = typename R::value_type
 The underlying type of elements of vectors. More...
 
using scalar_type = typename array::ArrayHandler< R, R >::value_type
 
using value_type_abs = typename array::ArrayHandler< R, R >::value_type_abs
 
using VectorP = std::vector< value_type >
 
using fapply_on_p_type = std::function< void(const std::vector< VectorP > &, const CVecRef< std::map< size_t, typename R::value_type > > &, const VecRef< R > &)>
 

Public Member Functions

 OptimizeBFGS (const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers, const std::shared_ptr< Logger > &logger_=std::make_shared< Logger >())
 
bool nonlinear () const override
 Report whether the class is a non-linear solver. More...
 
int add_vector (R &parameters, R &residual, value_type value) override
 
void BFGS_update_1 (R &residual, std::shared_ptr< const subspace::IXSpace< R, Q, P > > xspace, const Matrix< double > &H)
 
void BFGS_update_2 (R &z, std::shared_ptr< const subspace::IXSpace< R, Q, P > > xspace, const Matrix< double > &H)
 
size_t end_iteration (const VecRef< R > &parameters, const VecRef< R > &action) override
 Behaviour depends on the solver. More...
 
size_t end_iteration (std::vector< R > &parameters, std::vector< R > &action) override
 
size_t end_iteration (R &parameters, R &actions) override
 
void set_value_errors () override
 Implementation class should overload this to set errors in the current values (e.g. change in eigenvalues) More...
 
void set_max_size_qspace (int n)
 
int get_max_size_qspace () const
 
void set_options (const Options &options) override
 
std::shared_ptr< Optionsget_options () const override
 
void report (std::ostream &cout, bool endl=true) const override
 Writes a report to cout output stream. More...
 
void report (std::ostream &cout, bool endl=true) const override
 Writes a report to cout output stream. More...
 
void report () const override
 Writes a report to std::cout. More...
 
- Public Member Functions inherited from molpro::linalg::itsolv::IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > >
 IterativeSolverTemplate ()=delete
 
 IterativeSolverTemplate (const IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > > &)=delete
 
 IterativeSolverTemplate (IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > > &&) noexcept=default
 
IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > > & operator= (const IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > > &)=delete
 
IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > > & operator= (IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > > &&) noexcept=default
 
int add_vector (const VecRef< R > &parameters, const VecRef< R > &actions) override
 
int add_vector (std::vector< R > &parameters, std::vector< R > &actions) override
 
int add_vector (R &parameters, R &actions, value_type value=0) override
 
size_t add_p (const CVecRef< std::map< size_t, typename R::value_type > > &pparams, const array::Span< value_type > &pp_action_matrix, const VecRef< R > &parameters, const VecRef< R > &actions, fapply_on_p_type apply_p) override
 
void clearP () override
 
void solution (const std::vector< int > &roots, const VecRef< R > &parameters, const VecRef< R > &residual) override
 
void solution (const std::vector< int > &roots, std::vector< R > &parameters, std::vector< R > &residual) override
 
void solution (R &parameters, R &residual) override
 
void solution_params (const std::vector< int > &roots, std::vector< R > &parameters) override
 
void solution_params (const std::vector< int > &roots, const VecRef< R > &parameters) override
 
void solution_params (R &parameters) override
 
std::vector< size_t > suggest_p (const CVecRef< R > &solution, const CVecRef< R > &residual, size_t max_number, double threshold) override
 
const std::vector< int > & working_set () const override
 
size_t n_roots () const override
 
void set_n_roots (size_t roots) override
 
void set_options (const Options &options) override
 
std::shared_ptr< Optionsget_options () const override
 
const std::vector< scalar_type > & errors () const override
 
const Statisticsstatistics () const override
 
void report (std::ostream &cout, bool endl=true) const override
 
void report () const override
 
void set_convergence_threshold (double thresh) override
 
double convergence_threshold () const override
 
void set_convergence_threshold_value (double thresh) override
 
double convergence_threshold_value () const override
 
void set_verbosity (Verbosity v) override
 
void set_verbosity (int v) override
 
Verbosity get_verbosity () const override
 
void set_max_iter (int n) override
 
int get_max_iter () const override
 
void set_max_p (int n) override
 
int get_max_p () const override
 
void set_p_threshold (double threshold) override
 
double get_p_threshold () const override
 
const subspace::Dimensionsdimensions () const override
 Access dimensions of the subspace. More...
 
scalar_type value () const override
 
void set_profiler (molpro::profiler::Profiler &profiler) override
 
const std::shared_ptr< molpro::profiler::Profiler > & profiler () const override
 
bool solve (const VecRef< R > &parameters, const VecRef< R > &actions, const Problem< R > &problem, bool generate_initial_guess=false) override
 
bool solve (R &parameters, R &actions, const Problem< R > &problem, bool generate_initial_guess=false) override
 
bool solve (std::vector< R > &parameters, std::vector< R > &actions, const Problem< R > &problem, bool generate_initial_guess=false) override
 
bool test_problem (const Problem< R > &problem, R &v0, R &v1, int verbosity, double threshold) const override
 
- Public Member Functions inherited from molpro::linalg::itsolv::IterativeSolver< R, R, std::map< size_t, typename R::value_type > >
virtual ~IterativeSolver ()=default
 
 IterativeSolver ()=default
 
 IterativeSolver (const IterativeSolver< R, R, std::map< size_t, typename R::value_type > > &)=delete
 
 IterativeSolver (IterativeSolver< R, R, std::map< size_t, typename R::value_type > > &&) noexcept=default
 
IterativeSolver< R, R, std::map< size_t, typename R::value_type > > & operator= (const IterativeSolver< R, R, std::map< size_t, typename R::value_type > > &)=delete
 
IterativeSolver< R, R, std::map< size_t, typename R::value_type > > & operator= (IterativeSolver< R, R, std::map< size_t, typename R::value_type > > &&) noexcept=default
 
virtual bool solve (const VecRef< R > &parameters, const VecRef< R > &actions, const Problem< R > &problem, bool generate_initial_guess=false)=0
 Simplified one-call solver. More...
 
virtual bool solve (R &parameters, R &actions, const Problem< R > &problem, bool generate_initial_guess=false)=0
 
virtual bool solve (std::vector< R > &parameters, std::vector< R > &actions, const Problem< R > &problem, bool generate_initial_guess=false)=0
 
virtual int add_vector (const VecRef< R > &parameters, const VecRef< R > &actions)=0
 Take, typically, a current solution and residual, and add it to the solution space. More...
 
virtual int add_vector (std::vector< R > &parameters, std::vector< R > &action)=0
 
virtual int add_vector (R &parameters, R &action, value_type value=0)=0
 
virtual size_t add_p (const CVecRef< std::map< size_t, typename R::value_type > > &pparams, const array::Span< value_type > &pp_action_matrix, const VecRef< R > &parameters, const VecRef< R > &action, fapply_on_p_type apply_p)=0
 Add P-space vectors to the expansion set for linear methods. More...
 
virtual void clearP ()=0
 
virtual void solution (const std::vector< int > &roots, const VecRef< R > &parameters, const VecRef< R > &residual)=0
 Construct solution and residual for a given set of roots. More...
 
virtual void solution (const std::vector< int > &roots, std::vector< R > &parameters, std::vector< R > &residual)=0
 
virtual void solution (R &parameters, R &residual)=0
 
virtual void solution_params (const std::vector< int > &roots, const VecRef< R > &parameters)=0
 Constructs parameters of selected roots. More...
 
virtual void solution_params (const std::vector< int > &roots, std::vector< R > &parameters)=0
 
virtual void solution_params (R &parameters)=0
 
virtual size_t end_iteration (const VecRef< R > &parameters, const VecRef< R > &residual)=0
 Behaviour depends on the solver. More...
 
virtual size_t end_iteration (std::vector< R > &parameters, std::vector< R > &action)=0
 
virtual size_t end_iteration (R &parameters, R &action)=0
 
virtual bool end_iteration_needed ()=0
 signal whether end_iteration should be called More...
 
virtual std::vector< size_t > suggest_p (const CVecRef< R > &solution, const CVecRef< R > &residual, size_t max_number, double threshold)=0
 Get the solver's suggestion of which degrees of freedom would be best to add to the P-space. More...
 
virtual const std::vector< int > & working_set () const=0
 Working set of roots that are not yet converged. More...
 
virtual std::vector< scalar_typeworking_set_eigenvalues () const
 
virtual size_t n_roots () const=0
 
virtual void set_n_roots (size_t nroots)=0
 
virtual const std::vector< scalar_type > & errors () const=0
 
virtual const Statisticsstatistics () const=0
 
virtual void report (std::ostream &cout, bool endl=true) const=0
 Writes a report to cout output stream. More...
 
virtual void report () const=0
 Writes a report to std::cout. More...
 
virtual void set_convergence_threshold (double thresh)=0
 Sets the convergence threshold. More...
 
virtual double convergence_threshold () const=0
 Reports the convergence threshold. More...
 
virtual void set_convergence_threshold_value (double thresh)=0
 Sets the value convergence threshold. More...
 
virtual double convergence_threshold_value () const=0
 Reports the value convergence threshold. More...
 
virtual void set_verbosity (Verbosity v)=0
 
virtual void set_verbosity (int v)=0
 
virtual Verbosity get_verbosity () const=0
 
virtual void set_max_iter (int n)=0
 
virtual int get_max_iter () const=0
 
virtual void set_max_p (int n)=0
 
virtual int get_max_p () const=0
 
virtual void set_p_threshold (double thresh)=0
 
virtual double get_p_threshold () const=0
 
virtual const subspace::Dimensionsdimensions () const=0
 
virtual void set_options (const Options &options)=0
 
virtual std::shared_ptr< Optionsget_options () const=0
 
virtual scalar_type value () const=0
 Report the function value for the current optimum solution. More...
 
virtual bool nonlinear () const=0
 Report whether the class is a non-linear solver. More...
 
virtual void set_profiler (molpro::profiler::Profiler &profiler)=0
 Attach a profiler in order to collect performance data. More...
 
virtual const std::shared_ptr< molpro::profiler::Profiler > & profiler () const=0
 
virtual bool test_problem (const Problem< R > &problem, R &v0, R &v1, int verbosity=0, double threshold=1e-5) const=0
 Test a supplied problem class. More...
 

Public Attributes

std::shared_ptr< Loggerlogger
 

Protected Member Functions

void construct_residual (const std::vector< int > &roots, const CVecRef< R > &params, const VecRef< R > &actions) override
 Constructs residual for given roots provided their parameters and actions. More...
 
- Protected Member Functions inherited from molpro::linalg::itsolv::IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > >
 IterativeSolverTemplate (std::shared_ptr< subspace::IXSpace< R, R, std::map< size_t, typename R::value_type > > > xspace, std::shared_ptr< subspace::ISubspaceSolver< R, R, std::map< size_t, typename R::value_type > > > solver, std::shared_ptr< ArrayHandlers< R, R, std::map< size_t, typename R::value_type > > > handlers, std::shared_ptr< Statistics > stats, std::shared_ptr< Logger > logger)
 
virtual ~IterativeSolverTemplate ()
 
virtual void set_value_errors ()
 Implementation class should overload this to set errors in the current values (e.g. change in eigenvalues) More...
 
virtual void construct_residual (const std::vector< int > &roots, const CVecRef< R > &params, const VecRef< R > &actions)=0
 Constructs residual for given roots provided their parameters and actions. More...
 
virtual bool linearEigensystem () const
 
size_t solve_and_generate_working_set (const VecRef< R > &parameters, const VecRef< R > &action)
 Solves the subspace problems and selects the working set of roots, returning their parameters and residual in parameters and action. More...
 
void check_consistent_number_of_roots_and_solutions (const std::vector< TTT > &roots, const size_t nparams)
 
bool end_iteration_needed () override
 

Protected Attributes

std::vector< double > m_BFGS_update_alpha
 
bool m_linesearch
 
bool m_last_iteration_linesearching = false
 
int m_max_size_qspace = std::numeric_limits<int>::max()
 maximum size of Q space More...
 
bool m_strong_Wolfe = true
 Whether to use strong or weak Wolfe conditions. More...
 
double m_Wolfe_1 = 1e-4
 Acceptance parameter for function value; recommended value Nocedal and Wright p142. More...
 
double m_Wolfe_2 = 0.9
 Acceptance parameter for function gradient; recommended value Nocedal and Wright p142. More...
 
double m_linesearch_tolerance = .2
 
double m_linesearch_grow_factor
 If the predicted line search step is extrapolation, limit the step to this factor times the current step. More...
 
double m_quasinewton_maximum_step = std::numeric_limits<double>::max()
 
- Protected Attributes inherited from molpro::linalg::itsolv::IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > >
std::shared_ptr< ArrayHandlers< R, R, std::map< size_t, typename R::value_type > > > m_handlers
 Array handlers. More...
 
std::shared_ptr< subspace::IXSpace< R, R, std::map< size_t, typename R::value_type > > > m_xspace
 manages the subspace and associated data More...
 
std::shared_ptr< subspace::ISubspaceSolver< R, R, std::map< size_t, typename R::value_type > > > m_subspace_solver
 solves the subspace problem More...
 
std::vector< double > m_errors
 errors from the most recent solution More...
 
std::vector< double > m_value_errors
 value errors from the most recent solution More...
 
std::vector< int > m_working_set
 indices of roots in the working set More...
 
size_t m_nroots
 number of roots the solver is searching for More...
 
double m_convergence_threshold
 residual norms less than this mark a converged solution More...
 
double m_convergence_threshold_value
 value changes less than this mark a converged solution More...
 
std::shared_ptr< Statisticsm_stats
 accumulates statistics of operations performed by the solver More...
 
std::shared_ptr< Loggerm_logger
 logger More...
 
bool m_normalise_solution
 whether to normalise the solutions More...
 
fapply_on_p_type m_apply_p
 function that evaluates effect of action on the P space projection More...
 
Verbosity m_verbosity
 how much output to print in solve() More...
 
int m_max_iter
 maximum number of iterations in solve() More...
 
size_t m_max_p
 maximum size of P space More...
 
double m_p_threshold
 threshold for selecting P space More...
 
bool m_end_iteration_needed
 whether end_iteration should be called after any preconditioner More...
 

Member Typedef Documentation

◆ SolverTemplate

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
using molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::SolverTemplate = IterativeSolverTemplate<Optimize, R, Q, P>

◆ SubspaceSolver

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
using molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::SubspaceSolver = subspace::SubspaceSolverOptBFGS<R, Q, P>

Constructor & Destructor Documentation

◆ OptimizeBFGS()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::OptimizeBFGS ( const std::shared_ptr< ArrayHandlers< R, Q, P > > &  handlers,
const std::shared_ptr< Logger > &  logger_ = std::make_shared<Logger>() 
)
inlineexplicit

Member Function Documentation

◆ add_vector()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
int molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::add_vector ( R &  parameters,
R &  residual,
value_type  value 
)
inlineoverridevirtual

◆ BFGS_update_1()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::BFGS_update_1 ( R &  residual,
std::shared_ptr< const subspace::IXSpace< R, Q, P > >  xspace,
const Matrix< double > &  H 
)
inline

◆ BFGS_update_2()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::BFGS_update_2 ( R &  z,
std::shared_ptr< const subspace::IXSpace< R, Q, P > >  xspace,
const Matrix< double > &  H 
)
inline

◆ construct_residual()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::construct_residual ( const std::vector< int > &  roots,
const CVecRef< R > &  params,
const VecRef< R > &  actions 
)
inlineoverrideprotectedvirtual

Constructs residual for given roots provided their parameters and actions.

Implements molpro::linalg::itsolv::IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > >.

◆ end_iteration() [1/3]

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
size_t molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::end_iteration ( const VecRef< R > &  parameters,
const VecRef< R > &  residual 
)
inlineoverridevirtual

◆ end_iteration() [2/3]

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
size_t molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::end_iteration ( R &  parameters,
R &  actions 
)
inlineoverridevirtual

◆ end_iteration() [3/3]

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
size_t molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::end_iteration ( std::vector< R > &  parameters,
std::vector< R > &  action 
)
inlineoverridevirtual

◆ get_max_size_qspace()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
int molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::get_max_size_qspace ( ) const
inline

◆ get_options()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
std::shared_ptr< Options > molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::get_options ( ) const
inlineoverridevirtual

Return all options. This is no different than using getters, but can be used with forward declaration.

Implements molpro::linalg::itsolv::IterativeSolver< R, R, std::map< size_t, typename R::value_type > >.

◆ nonlinear()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
bool molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::nonlinear ( ) const
inlineoverridevirtual

Report whether the class is a non-linear solver.

Returns

Implements molpro::linalg::itsolv::IterativeSolver< R, R, std::map< size_t, typename R::value_type > >.

◆ report() [1/3]

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::IterativeSolverTemplate< Solver, R, Q, P >::report ( ) const
inlineoverridevirtual

◆ report() [2/3]

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::IterativeSolverTemplate< Solver, R, Q, P >::report ( std::ostream &  cout,
bool  endl = true 
) const
inlineoverridevirtual

◆ report() [3/3]

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::report ( std::ostream &  cout,
bool  endl = true 
) const
inlineoverridevirtual

◆ set_max_size_qspace()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::set_max_size_qspace ( int  n)
inline

Set a limit on the maximum size of Q space. This does not include the size of the working space (R) and the D space

◆ set_options()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::set_options ( const Options options)
inlineoverridevirtual

Set all spcecified options. This is no different than using setters, but can be used with forward declaration.

Implements molpro::linalg::itsolv::IterativeSolver< R, R, std::map< size_t, typename R::value_type > >.

◆ set_value_errors()

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
void molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::set_value_errors ( )
inlineoverridevirtual

Implementation class should overload this to set errors in the current values (e.g. change in eigenvalues)

Reimplemented from molpro::linalg::itsolv::IterativeSolverTemplate< Optimize, R, R, std::map< size_t, typename R::value_type > >.

Member Data Documentation

◆ logger

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
std::shared_ptr<Logger> molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::logger

◆ m_BFGS_update_alpha

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
std::vector<double> molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_BFGS_update_alpha
protected

◆ m_last_iteration_linesearching

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
bool molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_last_iteration_linesearching = false
protected

◆ m_linesearch

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
bool molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_linesearch
protected

◆ m_linesearch_grow_factor

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
double molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_linesearch_grow_factor
protected
Initial value:
=
2

If the predicted line search step is extrapolation, limit the step to this factor times the current step.

◆ m_linesearch_tolerance

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
double molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_linesearch_tolerance = .2
protected

If the predicted line search is within tolerance of the recently-evaluated point, don't bother taking it, but proceed to Quasi-Newton instead

◆ m_max_size_qspace

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
int molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_max_size_qspace = std::numeric_limits<int>::max()
protected

maximum size of Q space

◆ m_quasinewton_maximum_step

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
double molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_quasinewton_maximum_step = std::numeric_limits<double>::max()
protected

◆ m_strong_Wolfe

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
bool molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_strong_Wolfe = true
protected

Whether to use strong or weak Wolfe conditions.

◆ m_Wolfe_1

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
double molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_Wolfe_1 = 1e-4
protected

Acceptance parameter for function value; recommended value Nocedal and Wright p142.

◆ m_Wolfe_2

template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>>
double molpro::linalg::itsolv::OptimizeBFGS< R, Q, P >::m_Wolfe_2 = 0.9
protected

Acceptance parameter for function gradient; recommended value Nocedal and Wright p142.