28#ifndef _math_optimize_opt_h
29#define _math_optimize_opt_h
31#include <util/group/message.h>
32#include <util/state/state.h>
33#include <util/class/class.h>
34#include <math/scmat/matrix.h>
35#include <math/optimize/function.h>
36#include <math/optimize/conv.h>
51 std::string ckpt_file_;
98 void set_checkpoint_file(
const char*);
117 RefSCDimension dimension()
const {
return function_->dimension(); }
130 double initial_value_;
164 double decrease_factor_;
165 double backtrack_factor_;
200 int force_search()
const {
return force_search_; }
205 {
double temp = decrease_factor_; decrease_factor_ = factor;
return temp; }
Implements backtrack line search algorithm.
Definition opt.h:161
int sufficient_decrease(RefSCVector &step)
answers the question whether a given step satisfies the sufficient decrease (Armijo) condition
Backtrack(const Ref< KeyVal > &)
A KeyVal constructor is used to generate a Backtrack object from the input.
double set_decrease_factor(double factor)
Sets factor for sufficient decrease test.
Definition opt.h:204
double decrease_factor()
Returns factor for sufficient decrease test.
Definition opt.h:202
void print(std::ostream &=ExEnv::out0()) const
Print the object.
void save_data_state(StateOut &s)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
static std::ostream & out0()
Return an ostream that writes from node 0.
The LineOpt abstract class is used to perform one dimensional optimizations.
Definition opt.h:125
virtual void init(RefSCVector &direction)
Initializes the line search object.
void print(std::ostream &=ExEnv::out0()) const
Print the object.
void apply_transform(const Ref< NonlinearTransform > &)
Applies a nonlinear transform.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
virtual void init(RefSCVector &direction, Ref< Function > function)
Initializes the line search object.
The Optimize class is an abstract base class for classes that find the extreme points of Function's.
Definition opt.h:44
void set_max_iterations(int)
Set the iteration limit.
void set_checkpoint()
Set up for checkpointing.
void init()
Initialize the optimizer.
Optimize(StateIn &)
Restore the state of a Function object.
Ref< Function > function() const
Returns information about the Function being optimized.
Definition opt.h:113
void set_function(const Ref< Function > &)
Set the function to be optimized.
virtual int optimize()
Do the optimization.
virtual int update()=0
Take a step.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
Ref< Convergence > convergence() const
Return information about the Convergence object being used.
Definition opt.h:115
void print(std::ostream &=ExEnv::out0()) const
Print the object.
Optimize(const Ref< KeyVal > &)
The KeyVal constructor reads the following information:
The RefSCVector class is a smart pointer to an SCVector specialization.
Definition matrix.h:55
A template class that maintains references counts.
Definition ref.h:361
Base class for objects that can save/restore state.
Definition state.h:45
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
Contains all MPQC code up to version 3.
Definition mpqcin.h:14