MADNESS 0.10.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
QuasiNewton Class Reference

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

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

Public Member Functions

 QuasiNewton (const std::shared_ptr< OptimizationTargetInterface > &target, double tol=1e-6, double value_precision=1e-12, double gradient_precision=1e-12)
 
bool converged () const
 
double gradient_norm () const
 
bool optimize (Tensor< double > &x)
 
void set_update (const string &method)
 
double value () const
 
- Public Member Functions inherited from madness::OptimizerInterface
virtual ~OptimizerInterface ()
 

Private Member Functions

void hessian_update_bfgs (const Tensor< double > &dx, const Tensor< double > &dg)
 
void hessian_update_sr1 (const Tensor< double > &s, const Tensor< double > &y)
 
double line_search (double a1, double f0, double dxgrad, const Tensor< double > &x, const Tensor< double > &dx)
 
Tensor< double > new_search_direction (const Tensor< double > &g)
 

Private Attributes

double f
 
double gnorm
 
const double gradient_precision
 
Tensor< double > h
 
int n
 
std::shared_ptr< OptimizationTargetInterfacetarget
 
const double tol
 
string update
 
const double value_precision
 

Detailed Description

Optimization via quasi-Newton (BFGS or SR1 update)

Constructor & Destructor Documentation

◆ QuasiNewton()

QuasiNewton::QuasiNewton ( const std::shared_ptr< OptimizationTargetInterface > &  target,
double  tol = 1e-6,
double  value_precision = 1e-12,
double  gradient_precision = 1e-12 
)
inline

References target.

Member Function Documentation

◆ converged()

bool QuasiNewton::converged ( ) const
inlinevirtual

Implements madness::OptimizerInterface.

References gnorm, and tol.

Referenced by optimize().

◆ gradient_norm()

double QuasiNewton::gradient_norm ( ) const
inlinevirtual

Implements madness::OptimizerInterface.

References gnorm.

◆ hessian_update_bfgs()

void QuasiNewton::hessian_update_bfgs ( const Tensor< double > &  dx,
const Tensor< double > &  dg 
)
inlineprivate

◆ hessian_update_sr1()

void QuasiNewton::hessian_update_sr1 ( const Tensor< double > &  s,
const Tensor< double > &  y 
)
inlineprivate

◆ line_search()

double QuasiNewton::line_search ( double  a1,
double  f0,
double  dxgrad,
const Tensor< double > &  x,
const Tensor< double > &  dx 
)
inlineprivate

References a1, a2, madness::abs(), f1, madness::print(), target, and value_precision.

Referenced by optimize().

◆ new_search_direction()

Tensor< double > QuasiNewton::new_search_direction ( const Tensor< double > &  g)
inlineprivate

◆ optimize()

bool QuasiNewton::optimize ( Tensor< double > &  x)
inlinevirtual

◆ set_update()

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

References update.

Referenced by main().

◆ value()

double QuasiNewton::value ( ) const
inlinevirtual

Implements madness::OptimizerInterface.

References f.

Member Data Documentation

◆ f

double QuasiNewton::f
private

Referenced by optimize(), and value().

◆ gnorm

double QuasiNewton::gnorm
private

Referenced by converged(), gradient_norm(), and optimize().

◆ gradient_precision

const double QuasiNewton::gradient_precision
private

Referenced by new_search_direction().

◆ h

Tensor<double> QuasiNewton::h
private

◆ n

int QuasiNewton::n
private

◆ target

std::shared_ptr<OptimizationTargetInterface> QuasiNewton::target
private

Referenced by QuasiNewton(), line_search(), and optimize().

◆ tol

const double QuasiNewton::tol
private

Referenced by converged(), and new_search_direction().

◆ update

string QuasiNewton::update
private

Referenced by optimize(), and set_update().

◆ value_precision

const double QuasiNewton::value_precision
private

Referenced by line_search(), and optimize().


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