Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > contrib > by-pkgid > 263386785cefb9ae5d63b926d214d809 > files > 1038

mpqc-2.1.2-4mdk.ppc.rpm

<!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>function.h Source File</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:16:36 2002 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>function.h</h1><div class="fragment"><pre>00001 <font class="comment">//</font>
00002 <font class="comment">// function.h</font>
00003 <font class="comment">//</font>
00004 <font class="comment">// Copyright (C) 1996 Limit Point Systems, Inc.</font>
00005 <font class="comment">//</font>
00006 <font class="comment">// Author: Curtis Janssen &lt;cljanss@limitpt.com&gt;</font>
00007 <font class="comment">// Maintainer: LPS</font>
00008 <font class="comment">//</font>
00009 <font class="comment">// This file is part of the SC Toolkit.</font>
00010 <font class="comment">//</font>
00011 <font class="comment">// The SC Toolkit is free software; you can redistribute it and/or modify</font>
00012 <font class="comment">// it under the terms of the GNU Library General Public License as published by</font>
00013 <font class="comment">// the Free Software Foundation; either version 2, or (at your option)</font>
00014 <font class="comment">// any later version.</font>
00015 <font class="comment">//</font>
00016 <font class="comment">// The SC Toolkit is distributed in the hope that it will be useful,</font>
00017 <font class="comment">// but WITHOUT ANY WARRANTY; without even the implied warranty of</font>
00018 <font class="comment">// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</font>
00019 <font class="comment">// GNU Library General Public License for more details.</font>
00020 <font class="comment">//</font>
00021 <font class="comment">// You should have received a copy of the GNU Library General Public License</font>
00022 <font class="comment">// along with the SC Toolkit; see the file COPYING.LIB.  If not, write to</font>
00023 <font class="comment">// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.</font>
00024 <font class="comment">//</font>
00025 <font class="comment">// The U.S. Government is granted a limited license as per AL 91-7.</font>
00026 <font class="comment">//</font>
00027 
00028 <font class="preprocessor">#ifdef __GNUC__</font>
00029 <font class="preprocessor"></font><font class="preprocessor">#pragma interface</font>
00030 <font class="preprocessor"></font><font class="preprocessor">#endif</font>
00031 <font class="preprocessor"></font>
00032 <font class="preprocessor">#ifndef _math_optimize_function_h</font>
00033 <font class="preprocessor"></font><font class="preprocessor">#define _math_optimize_function_h</font>
00034 <font class="preprocessor"></font>
00035 <font class="preprocessor">#include &lt;math.h&gt;</font>
00036 <font class="preprocessor">#include &lt;float.h&gt;</font>
00037 
00038 <font class="preprocessor">#include &lt;util/state/state.h&gt;</font>
00039 <font class="preprocessor">#include &lt;math/optimize/transform.h&gt;</font>
00040 <font class="preprocessor">#include &lt;math/scmat/matrix.h&gt;</font>
00041 <font class="preprocessor">#include &lt;math/scmat/result.h&gt;</font>
00042 
00043 <font class="keyword">namespace </font>sc {
00044 
<a name="l00048"></a><a class="code" href="class_sc__Function.html">00048</a> <font class="keyword">class </font>Function: <font class="keyword">virtual</font> <font class="keyword">public</font> SavableState, <font class="keyword">public</font> Compute {
00049   <font class="keyword">protected</font>:
<a name="l00050"></a><a class="code" href="class_sc__Function.html#n0">00050</a>     Ref&lt;SCMatrixKit&gt; matrixkit_;          
00051 
<a name="l00052"></a><a class="code" href="class_sc__Function.html#n1">00052</a>     RefSCVector x_;                     
<a name="l00053"></a><a class="code" href="class_sc__Function.html#n2">00053</a>     RefSCDimension dim_;                
<a name="l00054"></a><a class="code" href="class_sc__Function.html#n3">00054</a>     AccResultdouble value_;             
<a name="l00055"></a><a class="code" href="class_sc__Function.html#n4">00055</a>     AccResultRefSCVector gradient_;     
<a name="l00056"></a><a class="code" href="class_sc__Function.html#n5">00056</a>     AccResultRefSymmSCMatrix hessian_;  
00057 
00062     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_value(<font class="keywordtype">double</font>);
00063     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_gradient(RefSCVector&amp;);
00064     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_hessian(RefSymmSCMatrix&amp;);
00066 
00069     <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_sc__Function.html#b3">set_matrixkit</a>(<font class="keyword">const</font> Ref&lt;SCMatrixKit&gt;&amp;);
00070     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_dimension(<font class="keyword">const</font> RefSCDimension&amp;);
00071 
00076     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_actual_value_accuracy(<font class="keywordtype">double</font>);
00077     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_actual_gradient_accuracy(<font class="keywordtype">double</font>);
00078     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_actual_hessian_accuracy(<font class="keywordtype">double</font>);
00080 
<a name="l00082"></a><a class="code" href="class_sc__Function.html#b8">00082</a>     RefSCVector&amp; <a class="code" href="class_sc__Function.html#b8">get_x_reference</a>()<font class="keyword"> </font>{ <a class="code" href="class_sc__Compute.html#a2">obsolete</a>(); <font class="keywordflow">return</font> x_; }
00083 
00086     <font class="keywordtype">void</font> <a class="code" href="class_sc__Function.html#b9">do_change_coordinates</a>(<font class="keyword">const</font> Ref&lt;NonlinearTransform&gt;&amp;);
00087   <font class="keyword">public</font>:
00088     <a class="code" href="class_sc__Function.html#a3">Function</a>();
00089     <a class="code" href="class_sc__Function.html#a3">Function</a>(StateIn&amp;);
00090     <a class="code" href="class_sc__Function.html#a3">Function</a>(<font class="keyword">const</font> Function&amp;);
00091 
00108     <a class="code" href="class_sc__Function.html#a3">Function</a>(<font class="keyword">const</font> Ref&lt;KeyVal&gt;&amp;, <font class="keywordtype">double</font> funcacc = DBL_EPSILON,
00109              <font class="keywordtype">double</font> gradacc = DBL_EPSILON, <font class="keywordtype">double</font> hessacc = DBL_EPSILON);
00110     <font class="keyword">virtual</font> ~Function();
00111 
00112     Function &amp; operator=(<font class="keyword">const</font> Function&amp;);
00113 
00116     Ref&lt;SCMatrixKit&gt; <a class="code" href="class_sc__Function.html#a6">matrixkit</a>() <font class="keyword">const</font>;
00118     RefSCDimension <a class="code" href="class_sc__Function.html#a7">dimension</a>() <font class="keyword">const</font>;
00119 
00120     <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_sc__Function.html#a8">save_data_state</a>(StateOut&amp;);
00121 
00123     <font class="keyword">virtual</font> <font class="keywordtype">double</font> <a class="code" href="class_sc__Function.html#a9">value</a>();
00125     <font class="keywordtype">int</font> <a class="code" href="class_sc__Function.html#a10">value_needed</a>() <font class="keyword">const</font>;
00129     <font class="keywordtype">int</font> <a class="code" href="class_sc__Function.html#a11">do_value</a>(<font class="keywordtype">int</font>);
00130     AccResultdouble&amp; value_result()<font class="keyword"> </font>{ <font class="keywordflow">return</font> value_; }
00131 
00133     <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_sc__Function.html#a13">set_desired_value_accuracy</a>(<font class="keywordtype">double</font>);
00135     <font class="keyword">virtual</font> <font class="keywordtype">double</font> <a class="code" href="class_sc__Function.html#a14">actual_value_accuracy</a>() <font class="keyword">const</font>;
00137     <font class="keyword">virtual</font> <font class="keywordtype">double</font> <a class="code" href="class_sc__Function.html#a15">desired_value_accuracy</a>() <font class="keyword">const</font>;
00138 
00143     <font class="keyword">virtual</font> RefSCVector gradient();
00144     <font class="keywordtype">int</font> gradient_needed() <font class="keyword">const</font>;
00145     <font class="keywordtype">int</font> do_gradient(<font class="keywordtype">int</font>);
00146     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_desired_gradient_accuracy(<font class="keywordtype">double</font>);
00147     <font class="keyword">virtual</font> <font class="keywordtype">double</font> actual_gradient_accuracy() <font class="keyword">const</font>;
00148     <font class="keyword">virtual</font> <font class="keywordtype">double</font> desired_gradient_accuracy() <font class="keyword">const</font>;
00149     AccResultRefSCVector&amp; gradient_result()<font class="keyword"> </font>{ <font class="keywordflow">return</font> gradient_; }
00151 
00156     <font class="keyword">virtual</font> RefSymmSCMatrix hessian();
00157     <font class="keywordtype">int</font> hessian_needed() <font class="keyword">const</font>;
00158     <font class="keywordtype">int</font> do_hessian(<font class="keywordtype">int</font>);
00159     <font class="keyword">virtual</font> <font class="keywordtype">void</font> set_desired_hessian_accuracy(<font class="keywordtype">double</font>);
00160     <font class="keyword">virtual</font> <font class="keywordtype">double</font> actual_hessian_accuracy() <font class="keyword">const</font>;
00161     <font class="keyword">virtual</font> <font class="keywordtype">double</font> desired_hessian_accuracy() <font class="keyword">const</font>;
00162     AccResultRefSymmSCMatrix&amp; hessian_result()<font class="keyword"> </font>{ <font class="keywordflow">return</font> hessian_; }
00164 
00165     <font class="comment">// hessian by gradients at finite displacements</font>
00166     <font class="comment">// virtual RefSCMatrix fd1_hessian();</font>
00167 
00169     <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_sc__Function.html#a30">guess_hessian</a>(RefSymmSCMatrix&amp;);
00170     <font class="keyword">virtual</font> RefSymmSCMatrix inverse_hessian(RefSymmSCMatrix&amp;);
00171 
00174     <font class="keyword">virtual</font> <font class="keywordtype">int</font> <a class="code" href="class_sc__Function.html#a32">value_implemented</a>() <font class="keyword">const</font>;
00175     <font class="keyword">virtual</font> <font class="keywordtype">int</font> gradient_implemented() <font class="keyword">const</font>;
00176     <font class="keyword">virtual</font> <font class="keywordtype">int</font> hessian_implemented() <font class="keyword">const</font>;
00177 
00179     <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_sc__Function.html#a35">set_x</a>(<font class="keyword">const</font> RefSCVector&amp;);
00180     RefSCVector get_x()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> x_.copy(); }
00181     <font class="keyword">const</font> RefSCVector&amp; get_x_no_copy()<font class="keyword"> const </font>{ <font class="keywordflow">return</font> x_; }
00182 
00189     <font class="keyword">virtual</font> Ref&lt;NonlinearTransform&gt; <a class="code" href="class_sc__Function.html#a38">change_coordinates</a>();
00190 
00192     <font class="keyword">virtual</font> <font class="keywordtype">void</font> <a class="code" href="class_sc__Function.html#a39">print</a>(std::ostream&amp; = ExEnv::out0()) <font class="keyword">const</font>;
00193 };
00194 
00195 }
00196 
00197 <font class="preprocessor">#endif</font>
00198 <font class="preprocessor"></font>
00199 <font class="comment">// Local Variables:</font>
00200 <font class="comment">// mode: c++</font>
00201 <font class="comment">// c-file-style: "CLJ"</font>
00202 <font class="comment">// End:</font>
</div></pre><hr>
<address>
<small>

Generated at Mon Oct 14 14:16:36 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>