.TH "sc::Optimize" 3 "Sun Oct 4 2020" "Version 2.3.1" "MPQC" \" -*- nroff -*- .ad l .nh .SH NAME sc::Optimize \- The \fBOptimize\fP class is an abstract base class for classes that find the extreme points of \fBFunction\fP's\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBsc::SavableState\fP\&. .PP Inherited by \fBsc::EFCOpt\fP, \fBsc::GDIISOpt\fP, \fBsc::LineOpt\fP, \fBsc::NewtonOpt\fP, \fBsc::QNewtonOpt\fP, and \fBsc::SteepestDescentOpt\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBOptimize\fP (\fBStateIn\fP &)" .br .RI "Restore the state of a \fBFunction\fP object\&. " .ti -1c .RI "\fBOptimize\fP (const \fBRef\fP< \fBKeyVal\fP > &)" .br .RI "The \fBKeyVal\fP constructor reads the following information: " .ti -1c .RI "void \fBsave_data_state\fP (\fBStateOut\fP &)" .br .RI "Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. " .ti -1c .RI "virtual int \fBoptimize\fP ()" .br .RI "Do the optimization\&. " .ti -1c .RI "void \fBset_checkpoint\fP ()" .br .RI "Set up for checkpointing\&. " .ti -1c .RI "void \fBset_checkpoint_file\fP (const char *)" .br .ti -1c .RI "void \fBset_function\fP (const \fBRef\fP< \fBFunction\fP > &)" .br .RI "Set the function to be optimized\&. " .ti -1c .RI "void \fBset_max_iterations\fP (int)" .br .RI "Set the iteration limit\&. " .ti -1c .RI "virtual void \fBinit\fP ()" .br .RI "Initialize the optimizer\&. " .ti -1c .RI "virtual int \fBupdate\fP ()=0" .br .RI "Take a step\&. " .ti -1c .RI "virtual void \fBapply_transform\fP (const \fBRef\fP< \fBNonlinearTransform\fP > &)" .br .ti -1c .RI "\fBRef\fP< \fBFunction\fP > \fBfunction\fP () const" .br .RI "Returns information about the \fBFunction\fP being optimized\&. " .ti -1c .RI "\fBRef\fP< \fBSCMatrixKit\fP > \fBmatrixkit\fP () const" .br .ti -1c .RI "\fBRefSCDimension\fP \fBdimension\fP () const" .br .in -1c .SS "Protected Attributes" .in +1c .ti -1c .RI "int \fBmax_iterations_\fP" .br .ti -1c .RI "int \fBn_iterations_\fP" .br .ti -1c .RI "int \fBckpt_\fP" .br .ti -1c .RI "int \fBprint_timings_\fP" .br .ti -1c .RI "double \fBmax_stepsize_\fP" .br .ti -1c .RI "char * \fBckpt_file\fP" .br .ti -1c .RI "\fBRef\fP< \fBFunction\fP > \fBfunction_\fP" .br .ti -1c .RI "\fBRef\fP< \fBConvergence\fP > \fBconv_\fP" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBOptimize\fP class is an abstract base class for classes that find the extreme points of \fBFunction\fP's\&. .SH "Constructor & Destructor Documentation" .PP .SS "sc::Optimize::Optimize (const \fBRef\fP< \fBKeyVal\fP > &)" .PP The \fBKeyVal\fP constructor reads the following information: .IP "\fB\fCcheckpoint\fP\fP" 1c If true, the optimization will be checkpointed\&. The default is false\&. .PP .IP "\fB\fCcheckpoint_file\fP\fP" 1c The name of the checkpoint file\&. The name defaults to opt_ckpt\&.dat\&. .PP .IP "\fB\fCmax_iterations\fP\fP" 1c The maximum number of interations\&. The default is 10\&. .PP .IP "\fB\fCmax_stepsize\fP\fP" 1c The maximum stepsize\&. The default is 0\&.6\&. .PP .IP "\fB\fCfunction\fP\fP" 1c A \fBFunction\fP object\&. There is no default\&. .PP .IP "\fB\fCconvergence\fP\fP" 1c This can be either a floating point number or a \fBConvergence\fP object\&. If it is a floating point number then it is the convergence criterion\&. See the description \fBConvergence\fP class for the default\&. .PP .PP .SH "Member Function Documentation" .PP .SS "virtual int sc::Optimize::optimize ()\fC [virtual]\fP" .PP Do the optimization\&. Returns nonzero if the optimization is complete\&. .SS "void sc::Optimize::save_data_state (\fBStateOut\fP &)\fC [virtual]\fP" .PP Save the base classes (with save_data_state) and the members in the same order that the \fBStateIn\fP CTOR initializes them\&. This must be implemented by the derived class if the class has data\&. .PP Reimplemented from \fBsc::SavableState\fP\&. .PP Reimplemented in \fBsc::SteepestDescentOpt\fP, \fBsc::QNewtonOpt\fP, and \fBsc::LineOpt\fP\&. .SS "virtual int sc::Optimize::update ()\fC [pure virtual]\fP" .PP Take a step\&. Returns 1 if the optimization has converged, otherwise 0\&. .PP Implemented in \fBsc::SteepestDescentOpt\fP, \fBsc::QNewtonOpt\fP, \fBsc::Backtrack\fP, \fBsc::NewtonOpt\fP, \fBsc::MCSearch\fP, \fBsc::GDIISOpt\fP, and \fBsc::EFCOpt\fP\&. .SH "Author" .PP Generated automatically by Doxygen for MPQC from the source code\&.