OptNewtonLike is the base class for Newton Methods. More...
Public Member Functions | |
virtual void | acceptStep (int k, int step_type) |
int | checkAnalyticFDGrad () |
Compare the analytic gradient with the finite difference gradient. | |
virtual int | checkConvg () |
Check to see if algorithm satisfies the convergence criterion. | |
virtual int | checkDeriv () |
Compare the analytic gradient with the finite difference gradient. | |
virtual NEWMAT::ColumnVector | computeSearch (NEWMAT::SymmetricMatrix &H) |
Compute Newton direction. | |
virtual int | computeStep (NEWMAT::ColumnVector sk) |
Compute the step length along the Newton direction. | |
DerivOption | getDerivOption () const |
Set the type of finite difference routine. | |
int | getFevals () const |
int | getGevals () const |
real | getGradMult () const |
NEWMAT::SymmetricMatrix | getHessian () const |
int | getSearchSize () const |
SearchStrategy | getSearchStrategy () const |
Set globalization strategy for optimization algorithms. | |
real | getTRSize () const |
bool | getWarmStart () const |
virtual void | initHessian () |
Compute the Hessian or its approximation at the initial point. | |
virtual void | initOpt () |
Initialize algorithmic parameters. | |
virtual double | initTrustRegionSize () const |
Initialize the size of the trust-region. | |
virtual void | optimize () |
Invoke Newton's method on an unconstrained problem. | |
OptNewtonLike (int n, TOLS t) | |
OptNewtonLike (int n, UPDATEFCN u) | |
OptNewtonLike (int n) | |
OptNewtonLike () | |
Default Constructor. | |
void | printStatus (char *) |
Print status of unconstrained Newton's method. | |
virtual void | readOptInput () |
Read user-specified input options from a file. | |
virtual void | reset () |
Reset parameters. | |
void | setDerivOption (DerivOption d) |
void | setGradMult (real tau) |
Set gradient multiplier which is used to compute trust-region radius. | |
void | setHessian (NEWMAT::SymmetricMatrix &H) |
Store the current Hessian matrix. | |
void | setSearchSize (int sss) |
Set number of points in search scheme for trust-pds search strategy. | |
void | setSearchStrategy (SearchStrategy s) |
void | setTRSize (real delta) |
Set trust-region radius. | |
virtual NEWMAT::SymmetricMatrix | updateH (NEWMAT::SymmetricMatrix &H, int k)=0 |
Compute the Hessian of the objective function or its approximation at the current point. | |
virtual void | updateModel (int k, int ndim, NEWMAT::ColumnVector x) |
void | UseWarmStart (NEWMAT::SymmetricMatrix &H) |
virtual | ~OptNewtonLike () |
Destructor. | |
Protected Member Functions | |
void | defaultAcceptStep (int, int) |
Provide default implementation of AcceptStep. | |
NEWMAT::ColumnVector | defaultComputeSearch (NEWMAT::SymmetricMatrix &) |
virtual NLP1 * | nlprob () const =0 |
Returns pointer to an NLP1 object. | |
Protected Attributes | |
DerivOption | finitediff |
User-specified derivative option. | |
NEWMAT::ColumnVector | gprev |
Gradient at the prev. iteration. | |
int | grad_evals |
Number of gradient evaluations. | |
real | gradMult |
Gradient multiplier to compute TR_size. | |
NEWMAT::SymmetricMatrix | Hessian |
Current Hessian. | |
int | searchSize |
Search pattern size for TRPDS. | |
SearchStrategy | strategy |
User-specified globalization Strategy. | |
real | TR_size |
Trust region radius. | |
bool | WarmStart |
Friends | |
int | trustpds (NLP1 *, ostream *, NEWMAT::SymmetricMatrix &, NEWMAT::ColumnVector &, NEWMAT::ColumnVector &, real &, real &, real stpmax, real stpmin, int) |
int | trustregion (NLP1 *, ostream *, NEWMAT::SymmetricMatrix &, NEWMAT::ColumnVector &, NEWMAT::ColumnVector &, real &, real &, real stpmax, real stpmin) |
OptNewtonLike is the base class for Newton Methods.
OptNewtonLike provides common data and functionality for OptFDNewton, OptQNewton, and OptNewton methods.
Definition at line 25 of file OptNewtonLike.h.
OPTPP::OptNewtonLike::OptNewtonLike | ( | ) | [inline] |
Default Constructor.
Definition at line 48 of file OptNewtonLike.h.
OPTPP::OptNewtonLike::OptNewtonLike | ( | int | n | ) | [inline] |
n | an integer argument. |
Definition at line 53 of file OptNewtonLike.h.
OPTPP::OptNewtonLike::OptNewtonLike | ( | int | n, | |
UPDATEFCN | u | |||
) | [inline] |
n | an integer argument. | |
u | a function pointer. |
Definition at line 62 of file OptNewtonLike.h.
References OPTPP::OptimizeClass::update_fcn.
OPTPP::OptNewtonLike::OptNewtonLike | ( | int | n, | |
TOLS | t | |||
) | [inline] |
n | an integer argument. | |
t | tolerance class reference. |
Definition at line 70 of file OptNewtonLike.h.
virtual OPTPP::OptNewtonLike::~OptNewtonLike | ( | ) | [inline, virtual] |
Destructor.
Definition at line 78 of file OptNewtonLike.h.
virtual void OPTPP::OptNewtonLike::acceptStep | ( | int | , | |
int | ||||
) | [inline, virtual] |
Implements OPTPP::OptimizeClass.
Definition at line 87 of file OptNewtonLike.h.
References defaultAcceptStep().
int OPTPP::OptNewtonLike::checkAnalyticFDGrad | ( | ) |
Compare the analytic gradient with the finite difference gradient.
virtual int OPTPP::OptNewtonLike::checkConvg | ( | ) | [virtual] |
Check to see if algorithm satisfies the convergence criterion.
Implements OPTPP::OptimizeClass.
virtual int OPTPP::OptNewtonLike::checkDeriv | ( | ) | [virtual] |
Compare the analytic gradient with the finite difference gradient.
Reimplemented in OPTPP::OptFDNewton, OPTPP::OptNewton, and OPTPP::OptQNewton.
virtual NEWMAT::ColumnVector OPTPP::OptNewtonLike::computeSearch | ( | NEWMAT::SymmetricMatrix & | H | ) | [inline, virtual] |
Compute Newton direction.
Implements OPTPP::OptimizeClass.
Definition at line 91 of file OptNewtonLike.h.
virtual int OPTPP::OptNewtonLike::computeStep | ( | NEWMAT::ColumnVector | sk | ) | [virtual] |
Compute the step length along the Newton direction.
void OPTPP::OptNewtonLike::defaultAcceptStep | ( | int | , | |
int | ||||
) | [protected, virtual] |
Provide default implementation of AcceptStep.
Reimplemented from OPTPP::OptimizeClass.
Referenced by acceptStep().
DerivOption OPTPP::OptNewtonLike::getDerivOption | ( | ) | const [inline] |
Set the type of finite difference routine.
Definition at line 186 of file OptNewtonLike.h.
References finitediff.
int OPTPP::OptNewtonLike::getFevals | ( | ) | const [inline] |
Definition at line 140 of file OptNewtonLike.h.
References OPTPP::OptimizeClass::fcn_evals.
int OPTPP::OptNewtonLike::getGevals | ( | ) | const [inline] |
Definition at line 145 of file OptNewtonLike.h.
References grad_evals.
real OPTPP::OptNewtonLike::getGradMult | ( | ) | const [inline] |
Definition at line 157 of file OptNewtonLike.h.
References gradMult.
NEWMAT::SymmetricMatrix OPTPP::OptNewtonLike::getHessian | ( | ) | const [inline] |
int OPTPP::OptNewtonLike::getSearchSize | ( | ) | const [inline] |
Definition at line 166 of file OptNewtonLike.h.
References searchSize.
SearchStrategy OPTPP::OptNewtonLike::getSearchStrategy | ( | ) | const [inline] |
Set globalization strategy for optimization algorithms.
Definition at line 178 of file OptNewtonLike.h.
References strategy.
real OPTPP::OptNewtonLike::getTRSize | ( | ) | const [inline] |
virtual void OPTPP::OptNewtonLike::initHessian | ( | ) | [virtual] |
Compute the Hessian or its approximation at the initial point.
Reimplemented in OPTPP::OptNewton.
virtual void OPTPP::OptNewtonLike::initOpt | ( | ) | [virtual] |
Initialize algorithmic parameters.
virtual double OPTPP::OptNewtonLike::initTrustRegionSize | ( | ) | const [virtual] |
Initialize the size of the trust-region.
Only relevant when either the trustregion or trustpds globalization strategies are selected
virtual NLP1* OPTPP::OptNewtonLike::nlprob | ( | ) | const [protected, pure virtual] |
Returns pointer to an NLP1 object.
Implemented in OPTPP::OptNewton1Deriv, and OPTPP::OptNewton2Deriv.
virtual void OPTPP::OptNewtonLike::optimize | ( | ) | [virtual] |
Invoke Newton's method on an unconstrained problem.
Implements OPTPP::OptimizeClass.
void OPTPP::OptNewtonLike::printStatus | ( | char * | ) | [virtual] |
Print status of unconstrained Newton's method.
Implements OPTPP::OptimizeClass.
Reimplemented in OPTPP::OptNewton.
virtual void OPTPP::OptNewtonLike::readOptInput | ( | ) | [virtual] |
Read user-specified input options from a file.
Implements OPTPP::OptimizeClass.
virtual void OPTPP::OptNewtonLike::reset | ( | ) | [virtual] |
Reset parameters.
Implements OPTPP::OptimizeClass.
void OPTPP::OptNewtonLike::setDerivOption | ( | DerivOption | d | ) | [inline] |
Definition at line 184 of file OptNewtonLike.h.
References finitediff.
void OPTPP::OptNewtonLike::setGradMult | ( | real | tau | ) | [inline] |
Set gradient multiplier which is used to compute trust-region radius.
Definition at line 159 of file OptNewtonLike.h.
References gradMult.
void OPTPP::OptNewtonLike::setHessian | ( | NEWMAT::SymmetricMatrix & | H | ) | [inline] |
Store the current Hessian matrix.
Definition at line 193 of file OptNewtonLike.h.
References Hessian.
void OPTPP::OptNewtonLike::setSearchSize | ( | int | sss | ) | [inline] |
Set number of points in search scheme for trust-pds search strategy.
Definition at line 168 of file OptNewtonLike.h.
References searchSize.
void OPTPP::OptNewtonLike::setSearchStrategy | ( | SearchStrategy | s | ) | [inline] |
Definition at line 176 of file OptNewtonLike.h.
References strategy.
void OPTPP::OptNewtonLike::setTRSize | ( | real | delta | ) | [inline] |
virtual NEWMAT::SymmetricMatrix OPTPP::OptNewtonLike::updateH | ( | NEWMAT::SymmetricMatrix & | H, | |
int | k | |||
) | [pure virtual] |
Compute the Hessian of the objective function or its approximation at the current point.
Implemented in OPTPP::OptFDNewton, OPTPP::OptNewton, and OPTPP::OptQNewton.
DerivOption OPTPP::OptNewtonLike::finitediff [protected] |
User-specified derivative option.
Definition at line 32 of file OptNewtonLike.h.
Referenced by getDerivOption(), and setDerivOption().
NEWMAT::ColumnVector OPTPP::OptNewtonLike::gprev [protected] |
Gradient at the prev. iteration.
Definition at line 28 of file OptNewtonLike.h.
int OPTPP::OptNewtonLike::grad_evals [protected] |
Number of gradient evaluations.
Definition at line 30 of file OptNewtonLike.h.
Referenced by getGevals().
real OPTPP::OptNewtonLike::gradMult [protected] |
Gradient multiplier to compute TR_size.
Definition at line 34 of file OptNewtonLike.h.
Referenced by getGradMult(), and setGradMult().
NEWMAT::SymmetricMatrix OPTPP::OptNewtonLike::Hessian [protected] |
Current Hessian.
Definition at line 29 of file OptNewtonLike.h.
Referenced by getHessian(), and setHessian().
int OPTPP::OptNewtonLike::searchSize [protected] |
Search pattern size for TRPDS.
Definition at line 35 of file OptNewtonLike.h.
Referenced by getSearchSize(), and setSearchSize().
SearchStrategy OPTPP::OptNewtonLike::strategy [protected] |
User-specified globalization Strategy.
Definition at line 31 of file OptNewtonLike.h.
Referenced by getSearchStrategy(), and setSearchStrategy().
real OPTPP::OptNewtonLike::TR_size [protected] |
Trust region radius.
Definition at line 33 of file OptNewtonLike.h.
Referenced by getTRSize(), and setTRSize().