<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta name="robots" content="noindex"> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>sc::Optimize class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body bgcolor="#ffffff"> <!-- Generated by Doxygen 1.2.5 on Mon Oct 14 14:17:18 2002 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>sc::Optimize Class Reference</h1>The <a class="el" href="class_sc__Optimize.html">Optimize</a> class is an abstract base class for classes that find the extreme points of <a class="el" href="class_sc__Function.html">Function</a>'s. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="opt_h-source.html">opt.h</a>></code> <p> Inheritance diagram for sc::Optimize<p><center><img src="class_sc__Optimize_inherit_graph.gif" border="0" usemap="#sc::Optimize_inherit_map" alt="Inheritance graph"></center> <map name="sc::Optimize_inherit_map"> <area href="class_sc__EFCOpt.html" shape="rect" coords="14,347,89,365"> <area href="class_sc__LineOpt.html" shape="rect" coords="222,347,297,365"> <area href="class_sc__QNewtonOpt.html" shape="rect" coords="438,347,542,365"> <area href="class_sc__SavableState.html" shape="rect" coords="262,213,363,232"> <area href="class_sc__DescribedClass.html" shape="rect" coords="255,147,370,165"> <area href="class_sc__RefCount.html" shape="rect" coords="271,80,354,99"> <area href="class_sc__Identity.html" shape="rect" coords="277,13,349,32"> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for sc::Optimize:<p><center><img src="class_sc__Optimize_coll_graph.gif" border="0" usemap="#sc::Optimize_coll_map" alt="Collaboration graph"></center> <map name="sc::Optimize_coll_map"> <area href="class_sc__SavableState.html" shape="rect" coords="21,222,122,241"> <area href="class_sc__DescribedClass.html" shape="rect" coords="14,153,129,171"> <area href="class_sc__RefCount.html" shape="rect" coords="30,83,113,102"> <area href="class_sc__Identity.html" shape="rect" coords="35,14,107,33"> <area href="class_sc__Ref.html" shape="rect" coords="146,222,266,241"> <area href="class_sc__RefBase.html" shape="rect" coords="243,153,321,171"> <area href="class_sc__Ref.html" shape="rect" coords="290,222,431,241"> </map> <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_sc__Optimize-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top><a name="a0" doxytag="sc::Optimize::Optimize"></a> </td><td valign=bottom><b>Optimize</b> ()</td></tr> <tr><td nowrap align=right valign=top><a name="a1" doxytag="sc::Optimize::Optimize"></a> </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a1">Optimize</a> (<a class="el" href="class_sc__StateIn.html">StateIn</a> &)</td></tr> <tr><td> </td><td><font size=-1><em>Restore the state of a <a class="el" href="class_sc__Function.html">Function</a> object.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a2">Optimize</a> (const <a class="el" href="class_sc__Ref.html">Ref</a>< <a class="el" href="class_sc__KeyVal.html">KeyVal</a> > &)</td></tr> <tr><td> </td><td><font size=-1><em>The <a class="el" href="class_sc__KeyVal.html">KeyVal</a> constructor reads the following information:.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a3" doxytag="sc::Optimize::~Optimize"></a> virtual </td><td valign=bottom><b>~Optimize</b> ()</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a4">save_data_state</a> (<a class="el" href="class_sc__StateOut.html">StateOut</a> &)</td></tr> <tr><td> </td><td><font size=-1><em>Save the base classes (with save_data_state) and the members in the same order that the <a class="el" href="class_sc__StateIn.html">StateIn</a> CTOR initializes them.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual int </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a5">optimize</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Do the optimization.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a6" doxytag="sc::Optimize::set_checkpoint"></a> void </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a6">set_checkpoint</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Set up for checkpointing.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a7" doxytag="sc::Optimize::set_checkpoint_file"></a> void </td><td valign=bottom><b>set_checkpoint_file</b> (const char *)</td></tr> <tr><td nowrap align=right valign=top><a name="a8" doxytag="sc::Optimize::set_function"></a> void </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a8">set_function</a> (const <a class="el" href="class_sc__Ref.html">Ref</a>< <a class="el" href="class_sc__Function.html">Function</a> > &)</td></tr> <tr><td> </td><td><font size=-1><em>Set the function to be optimized.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a9" doxytag="sc::Optimize::set_max_iterations"></a> void </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a9">set_max_iterations</a> (int)</td></tr> <tr><td> </td><td><font size=-1><em>Set the iteration limit.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a10" doxytag="sc::Optimize::init"></a> virtual void </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a10">init</a> ()</td></tr> <tr><td> </td><td><font size=-1><em>Initialize the optimizer.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual int </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a11">update</a> ()=0</td></tr> <tr><td> </td><td><font size=-1><em>Take a step.</em> <a href="#a11">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a12" doxytag="sc::Optimize::apply_transform"></a> virtual void </td><td valign=bottom><b>apply_transform</b> (const <a class="el" href="class_sc__Ref.html">Ref</a>< <a class="el" href="class_sc__NonlinearTransform.html">NonlinearTransform</a> > &)</td></tr> <tr><td nowrap align=right valign=top><a name="a13" doxytag="sc::Optimize::function"></a> <a class="el" href="class_sc__Ref.html">Ref</a><<a class="el" href="class_sc__Function.html">Function</a>> </td><td valign=bottom><a class="el" href="class_sc__Optimize.html#a13">function</a> () const</td></tr> <tr><td> </td><td><font size=-1><em>Returns information about the <a class="el" href="class_sc__Function.html">Function</a> being optimized.</em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a name="a14" doxytag="sc::Optimize::matrixkit"></a> <a class="el" href="class_sc__Ref.html">Ref</a><<a class="el" href="class_sc__SCMatrixKit.html">SCMatrixKit</a>> </td><td valign=bottom><b>matrixkit</b> () const</td></tr> <tr><td nowrap align=right valign=top><a name="a15" doxytag="sc::Optimize::dimension"></a> <a class="el" href="class_sc__RefSCDimension.html">RefSCDimension</a> </td><td valign=bottom><b>dimension</b> () const</td></tr> <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> <tr><td nowrap align=right valign=top><a name="n0" doxytag="sc::Optimize::max_iterations_"></a> int </td><td valign=bottom><b>max_iterations_</b></td></tr> <tr><td nowrap align=right valign=top><a name="n1" doxytag="sc::Optimize::n_iterations_"></a> int </td><td valign=bottom><b>n_iterations_</b></td></tr> <tr><td nowrap align=right valign=top><a name="n2" doxytag="sc::Optimize::ckpt_"></a> int </td><td valign=bottom><b>ckpt_</b></td></tr> <tr><td nowrap align=right valign=top><a name="n3" doxytag="sc::Optimize::print_timings_"></a> int </td><td valign=bottom><b>print_timings_</b></td></tr> <tr><td nowrap align=right valign=top><a name="n4" doxytag="sc::Optimize::max_stepsize_"></a> double </td><td valign=bottom><b>max_stepsize_</b></td></tr> <tr><td nowrap align=right valign=top><a name="n5" doxytag="sc::Optimize::ckpt_file"></a> char* </td><td valign=bottom><b>ckpt_file</b></td></tr> <tr><td nowrap align=right valign=top><a name="n6" doxytag="sc::Optimize::function_"></a> <a class="el" href="class_sc__Ref.html">Ref</a><<a class="el" href="class_sc__Function.html">Function</a>> </td><td valign=bottom><b>function_</b></td></tr> <tr><td nowrap align=right valign=top><a name="n7" doxytag="sc::Optimize::conv_"></a> <a class="el" href="class_sc__Ref.html">Ref</a><<a class="el" href="class_sc__Convergence.html">Convergence</a>> </td><td valign=bottom><b>conv_</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The <a class="el" href="class_sc__Optimize.html">Optimize</a> class is an abstract base class for classes that find the extreme points of <a class="el" href="class_sc__Function.html">Function</a>'s. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a2" doxytag="sc::Optimize::Optimize"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> sc::Optimize::Optimize ( </b></td> <td valign="bottom"><b> const <a class="el" href="class_sc__Ref.html">Ref</a>< <a class="el" href="class_sc__KeyVal.html">KeyVal</a> > & ) </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> The <a class="el" href="class_sc__KeyVal.html">KeyVal</a> constructor reads the following information:. <p> <dl compact> <p> <dt><code>checkpoint</code><dd> If true, the optimization will be checkpointed. The default is false. <p> <dt><code>checkpoint_file</code><dd> The name of the checkpoint file. The name defaults to opt_ckpt.dat. <p> <dt><code>max_iterations</code><dd> The maximum number of interations. The default is 10. <p> <dt><code>max_stepsize</code><dd> The maximum stepsize. The default is 0.6. <p> <dt><code>function</code><dd> A <a class="el" href="class_sc__Function.html">Function</a> object. There is no default. <p> <dt><code>convergence</code><dd> This can be either a floating point number or a <a class="el" href="class_sc__Convergence.html">Convergence</a> object. If it is a floating point number then it is the convergence criterion. See the description <a class="el" href="class_sc__Convergence.html">Convergence</a> class for the default. <p> </dl> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a5" doxytag="sc::Optimize::optimize"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> int sc::Optimize::optimize ( </b></td> <td valign="bottom"><b> )<code> [virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Do the optimization. <p> Returns nonzero if the optimization is complete. </td> </tr> </table> <a name="a4" doxytag="sc::Optimize::save_data_state"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> void sc::Optimize::save_data_state ( </b></td> <td valign="bottom"><b> <a class="el" href="class_sc__StateOut.html">StateOut</a> & <em>s</em> )<code> [virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Save the base classes (with save_data_state) and the members in the same order that the <a class="el" href="class_sc__StateIn.html">StateIn</a> CTOR initializes them. <p> This must be implemented by the derived class if the class has data. <p> Reimplemented from <a class="el" href="class_sc__SavableState.html#a5">sc::SavableState</a>. <p> Reimplemented in <a class="el" href="class_sc__EFCOpt.html#a3">sc::EFCOpt</a>, <a class="el" href="class_sc__LineOpt.html#a4">sc::LineOpt</a>, and <a class="el" href="class_sc__QNewtonOpt.html#a3">sc::QNewtonOpt</a>. </td> </tr> </table> <a name="a11" doxytag="sc::Optimize::update"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td nowrap valign="top"><b> int sc::Optimize::update ( </b></td> <td valign="bottom"><b> )<code> [pure virtual]</code> </b></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Take a step. <p> Returns 1 if the optimization has converged, otherwise 0. <p> Reimplemented in <a class="el" href="class_sc__EFCOpt.html#a6">sc::EFCOpt</a>, and <a class="el" href="class_sc__QNewtonOpt.html#a6">sc::QNewtonOpt</a>. </td> </tr> </table> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="opt_h-source.html">opt.h</a></ul> <hr> <address> <small> Generated at Mon Oct 14 14:17:18 2002 for <a href="http://aros.ca.sandia.gov/~cljanss/mpqc">MPQC</a> 2.1.2 using the documentation package <a href="http://www.stack.nl/~dimitri/doxygen/index.html">Doxygen</a> 1.2.5. </small> </address> </body> </html>