MADNESS  version 0.9
Public Member Functions | List of all members

Optimization via quasi-Newton (BFGS or SR1 update) More...

#include <solvers.h>

Inheritance diagram for madness::QuasiNewton:
Inheritance graph
[legend]
Collaboration diagram for madness::QuasiNewton:
Collaboration graph
[legend]

Public Member Functions

 QuasiNewton (const std::shared_ptr< OptimizationTargetInterface > &tar, int maxiter=20, double tol=1e-6, double value_precision=1e-12, double gradient_precision=1e-12)
 
void set_update (const std::string &method)
 Choose update method (currently only "BFGS" or "SR1") More...
 
void set_test (const bool &test_level)
 Choose update method (currently only "BFGS" or "SR1") More...
 
bool optimize (Tensor< double > &x)
 Runs the optimizer. More...
 
bool converged () const
 After running the optimizer returns true if converged. More...
 
double value () const
 Value of objective function. More...
 
void reset_hessian ()
 Resets Hessian to default guess. More...
 
void set_hessian (const Tensor< double > &matrix)
 Sets Hessian to given matrix. More...
 
double gradient_norm () const
 Value of gradient norm. More...
 
virtual ~QuasiNewton ()
 
- Public Member Functions inherited from madness::OptimizerInterface
virtual ~OptimizerInterface ()
 

Detailed Description

Optimization via quasi-Newton (BFGS or SR1 update)

This is presently not a low memory algorithm ... we really need one!

Constructor & Destructor Documentation

QuasiNewton::QuasiNewton ( const std::shared_ptr< OptimizationTargetInterface > &  tar,
int  maxiter = 20,
double  tol = 1e-6,
double  value_precision = 1e-12,
double  gradient_precision = 1e-12 
)
virtual madness::QuasiNewton::~QuasiNewton ( )
inlinevirtual

Member Function Documentation

bool QuasiNewton::converged ( ) const
virtual

After running the optimizer returns true if converged.

Returns
True if converged

Implements madness::OptimizerInterface.

Referenced by optimize().

double QuasiNewton::gradient_norm ( ) const
virtual

Value of gradient norm.

Returns
Norm of gradient of objective function

Implements madness::OptimizerInterface.

bool QuasiNewton::optimize ( Tensor< double > &  x)
virtual
void madness::QuasiNewton::reset_hessian ( )
inline

Resets Hessian to default guess.

Referenced by main().

void madness::QuasiNewton::set_hessian ( const Tensor< double > &  matrix)
inline

Sets Hessian to given matrix.

References madness::copy().

Referenced by main().

void QuasiNewton::set_test ( const bool &  test_level)

Choose update method (currently only "BFGS" or "SR1")

Referenced by main().

void QuasiNewton::set_update ( const std::string &  method)

Choose update method (currently only "BFGS" or "SR1")

Referenced by main().

double QuasiNewton::value ( ) const
virtual

Value of objective function.

Returns
Value of objective function

Implements madness::OptimizerInterface.


The documentation for this class was generated from the following files: