#include <lbfgsalg.hh>
Inheritance diagram for RVLUmin::LBFGSOp< Scalar >:
Public Member Functions | |
LBFGSOp (const Space< Scalar > &_sp, Scalar ihs, int maxnum) | |
Usual constructor. | |
LBFGSOp (const LBFGSOp< Scalar > &op) | |
Copy constructor. | |
~LBFGSOp () | |
const Space< Scalar > & | getDomain () const |
const Space< Scalar > & | getRange () const |
Scalar | getScale () |
void | update (const Vector< Scalar > &x, const Vector< Scalar > &xnext, const Vector< Scalar > &g, const Vector< Scalar > &gnext) |
update requires current and next $x$ and current and next gradient. | |
void | reset () |
ostream & | write (ostream &str) const |
write methods to print out useful information about the object. | |
Protected Member Functions | |
LinearOp< Scalar > * | clone () const |
void | apply (const Vector< Scalar > &x, Vector< Scalar > &y) const |
void | applyAdj (const Vector< Scalar > &y, Vector< Scalar > &x) const |
This approximation uses local changes to the gradient to gradually build up an estimate of the Hessian for use in nonlinear optimization problems.
For details of the algorithm, see the paper
"Updating Quasi-Newton Matrices with Limited Storage" by Jorge Nocedal, Math. of Computation, Vol. 35, no. 151, p.p. 773--782.
Note that the operator is an approximation to the inverse Hessian, so the the apply method computes the quasi-Newton step.
The BFGS approximation is based on successive rank-one perturbations to an initial approximation; these rank-one perturbations can be represented as outer products. This class allows the user to provide a symmetric positive definite operator to define an alternate inner product, which then changes the definition of the outer product. In the context of an optimization problem, this is equivalent to implementing the algorithm in the alternate inner product.
Definition at line 72 of file lbfgsalg.hh.
RVLUmin::LBFGSOp< Scalar >::LBFGSOp | ( | const Space< Scalar > & | _sp, | |
Scalar | ihs, | |||
int | maxnum | |||
) |
Usual constructor.
Needs a multiple of the identity to use for the initial inverse Hessian approximation, the maximum number of updates, and, optionally, an operator to change the inner product.
Definition at line 161 of file lbfgsalg.hh.
RVLUmin::LBFGSOp< Scalar >::LBFGSOp | ( | const LBFGSOp< Scalar > & | op | ) |
Copy constructor.
Definition at line 169 of file lbfgsalg.hh.
References RVLUmin::LBFGSOp< Scalar >::Svec, and RVLUmin::LBFGSOp< Scalar >::Yvec.
RVLUmin::LBFGSOp< Scalar >::~LBFGSOp | ( | ) |
Definition at line 178 of file lbfgsalg.hh.
LinearOp<Scalar>* RVLUmin::LBFGSOp< Scalar >::clone | ( | ) | const [protected, virtual] |
void RVLUmin::LBFGSOp< Scalar >::apply | ( | const Vector< Scalar > & | x, | |
Vector< Scalar > & | y | |||
) | const [protected, virtual] |
Implements RVL::Operator< Scalar >.
Definition at line 98 of file lbfgsalg.hh.
References RVL::Vector< Scalar >::copy(), and RVL::Vector< Scalar >::scale().
void RVLUmin::LBFGSOp< Scalar >::applyAdj | ( | const Vector< Scalar > & | y, | |
Vector< Scalar > & | x | |||
) | const [protected, virtual] |
Implements RVL::LinearOp< Scalar >.
Definition at line 144 of file lbfgsalg.hh.
References RVL::LinearOp< Scalar >::applyOp().
const Space<Scalar>& RVLUmin::LBFGSOp< Scalar >::getDomain | ( | ) | const [virtual] |
const Space<Scalar>& RVLUmin::LBFGSOp< Scalar >::getRange | ( | ) | const [virtual] |
Scalar RVLUmin::LBFGSOp< Scalar >::getScale | ( | ) |
Definition at line 184 of file lbfgsalg.hh.
void RVLUmin::LBFGSOp< Scalar >::update | ( | const Vector< Scalar > & | x, | |
const Vector< Scalar > & | xnext, | |||
const Vector< Scalar > & | g, | |||
const Vector< Scalar > & | gnext | |||
) |
update requires current and next $x$ and current and next gradient.
Definition at line 195 of file lbfgsalg.hh.
References RVLUmin::LBFGSOp< Scalar >::reset().
void RVLUmin::LBFGSOp< Scalar >::reset | ( | ) |
ostream& RVLUmin::LBFGSOp< Scalar >::write | ( | ostream & | str | ) | const [virtual] |
write methods to print out useful information about the object.
Implements RVL::Writeable.
Definition at line 258 of file lbfgsalg.hh.