Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > eebc325dc36bd6e3b09b9b45133e42f8 > files > 1748

HippoDraw-devel-docs-1.21.1-10.fc13.i686.rpm

<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>HippoDraw Class Library</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="hippoApp.ico">
</head><body>
<!-- Generated by Doxygen 1.6.2 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_bd46360b4c6a7cd846adf95fa79d46e4.html">python</a>
  </div>
</div>
<div class="contents">
<h1>PyFunctionRep.cxx</h1><a href="PyFunctionRep_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00012"></a>00012 <span class="comment">// for dll interface warning</span>
<a name="l00013"></a>00013 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#include &quot;msdevstudio/MSconfig.h&quot;</span>
<a name="l00015"></a>00015 <span class="preprocessor">#endif</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="comment">// include first to avoid _POSIX_C_SOURCE warning.</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;boost/python.hpp&gt;</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;<a class="code" href="PyFunctionRep_8h.html" title="hippodraw::PyFunctionRep class interface.">PyFunctionRep.h</a>&quot;</span>
<a name="l00021"></a>00021 
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="PyApp_8h.html" title="hippodraw::PyApp class interface.">PyApp.h</a>&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="PyDataRep_8h.html" title="hippodraw::PyDataRep class interface">PyDataRep.h</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="QtDisplay_8h.html" title="hippodraw::QtDisplay class interface.">QtDisplay.h</a>&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="FunctionController_8h.html" title="hippodraw::FunctionController class interface">controllers/FunctionController.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="FunctionRep_8h.html" title="hippodraw::FunctionRep class interface">datareps/FunctionRep.h</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="FunctionBase_8h.html" title="hippodraw::FunctionBase class interface">functions/FunctionBase.h</a>&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="FactoryException_8h.html" title="FactoryException class interface.">pattern/FactoryException.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;<a class="code" href="PlotterBase_8h.html" title="hippodraw::PlotterBase class interface.">plotters/PlotterBase.h</a>&quot;</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="keyword">using</span> std::vector;
<a name="l00033"></a>00033 <span class="keyword">using namespace </span>boost::python;
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="keyword">namespace </span>hippodraw {
<a name="l00036"></a>00036 <span class="keyword">namespace </span>Python {
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="keywordtype">void</span>
<a name="l00039"></a><a class="code" href="namespacehippodraw_1_1Python.html#aab38f6f635490773700ebc1f335f0944">00039</a> <a class="code" href="namespacehippodraw_1_1Python.html#aab38f6f635490773700ebc1f335f0944" title="Exports the PyFunctionRep class to Python.">export_Function</a>()
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041   class_ &lt; PyFunctionRep &gt;
<a name="l00042"></a>00042     ( <span class="stringliteral">&quot;Function&quot;</span>,
<a name="l00043"></a>00043       <span class="stringliteral">&quot;This class wraps a FunctionBase object with a DataRep. This allows\n&quot;</span>
<a name="l00044"></a>00044       <span class="stringliteral">&quot;it to be drawn in a Display.   It also provides interface to member\n&quot;</span>
<a name="l00045"></a>00045       <span class="stringliteral">&quot;functions of FunctionBase, although the user could obtain a\n&quot;</span>
<a name="l00046"></a>00046       <span class="stringliteral">&quot;reference to the FunctionBase itself to do so.&quot;</span>,
<a name="l00047"></a>00047       init &lt; const std::string &amp;, PyDataRep * &gt;
<a name="l00048"></a>00048       ( <span class="stringliteral">&quot;Function ( string,  DataRep ) -&gt; Function\n&quot;</span>
<a name="l00049"></a>00049         <span class="stringliteral">&quot;Function ( FunctionBase, DataRep ) -&gt; Function\n&quot;</span>
<a name="l00050"></a>00050         <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00051"></a>00051         <span class="stringliteral">&quot;The first form creates a function using the string to find the\n&quot;</span>
<a name="l00052"></a>00052         <span class="stringliteral">&quot;FunctionBase in the FunctionFactory.   The second form creates a\n&quot;</span>
<a name="l00053"></a>00053         <span class="stringliteral">&quot;using an existing FunctionBase object.   Both forms use the DataRep\n&quot;</span>
<a name="l00054"></a>00054         <span class="stringliteral">&quot;as target for fitting and drawing\n&quot;</span> ) )
<a name="l00055"></a>00055 
<a name="l00056"></a>00056      .def ( init &lt; FunctionBase *, PyDataRep * &gt;
<a name="l00057"></a>00057             ( ) )
<a name="l00058"></a>00058 
<a name="l00059"></a>00059     .def ( init &lt; FunctionBase * &gt;
<a name="l00060"></a>00060             ( ) )
<a name="l00061"></a>00061 
<a name="l00062"></a>00062     .def ( <span class="stringliteral">&quot;addTo&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a328eae92d850302abb4dff0d4a0bb720" title="Adds the function on to the display.">PyFunctionRep::addTo</a>,
<a name="l00063"></a>00063            <span class="stringliteral">&quot;addTo ( Display ) -&gt; None\n&quot;</span>
<a name="l00064"></a>00064            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00065"></a>00065            <span class="stringliteral">&quot;Adds the Function to a Display. taking the Display&#39;s selected\n&quot;</span>
<a name="l00066"></a>00066            <span class="stringliteral">&quot;DataRep as its target.&quot;</span> )
<a name="l00067"></a>00067 
<a name="l00068"></a>00068     .def ( <span class="stringliteral">&quot;parmNames&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a1047155d04f6fa2965ab2c46871c3c7e" title="Returns the names of the parameters.">PyFunctionRep::parmNames</a>,
<a name="l00069"></a>00069            return_value_policy &lt; copy_const_reference &gt; (),
<a name="l00070"></a>00070            <span class="stringliteral">&quot;parmNames ( None ) -&gt; list\n&quot;</span>
<a name="l00071"></a>00071            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00072"></a>00072            <span class="stringliteral">&quot;Returns a list of parameter names.&quot;</span> )
<a name="l00073"></a>00073    
<a name="l00074"></a>00074     .def ( <span class="stringliteral">&quot;parameters&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a8feaee11443a07a66049bd4fee2a7689" title="Returns the current values of the parameters.">PyFunctionRep::parameters</a>,
<a name="l00075"></a>00075            return_value_policy &lt; copy_const_reference &gt; (),
<a name="l00076"></a>00076            <span class="stringliteral">&quot;parameters ( None ) -&gt; list\n&quot;</span>
<a name="l00077"></a>00077            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00078"></a>00078            <span class="stringliteral">&quot;Returns a list of the function&#39;s parameter values.&quot;</span> )
<a name="l00079"></a>00079 
<a name="l00080"></a>00080     .def ( <span class="stringliteral">&quot;principleErrors&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a48e275e03e4a6af662d3f3314a71713c" title="Returns the principle error values associated with the parameters.">PyFunctionRep::principleErrors</a>,
<a name="l00081"></a>00081            return_value_policy &lt; copy_const_reference &gt; (),
<a name="l00082"></a>00082            <span class="stringliteral">&quot;principleErrors ( None ) -&gt; list\n&quot;</span>
<a name="l00083"></a>00083            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00084"></a>00084            <span class="stringliteral">&quot;Returns the errors on the parameters.&quot;</span> )
<a name="l00085"></a>00085 
<a name="l00086"></a>00086     .def ( <span class="stringliteral">&quot;errors&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a48e275e03e4a6af662d3f3314a71713c" title="Returns the principle error values associated with the parameters.">PyFunctionRep::principleErrors</a>,
<a name="l00087"></a>00087            return_value_policy &lt; copy_const_reference &gt; (),
<a name="l00088"></a>00088            <span class="stringliteral">&quot;errors ( None ) - &gt; list\n&quot;</span>
<a name="l00089"></a>00089            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00090"></a>00090            <span class="stringliteral">&quot;Returns the errors on the parameters.  The errors are calculated\n&quot;</span>
<a name="l00091"></a>00091            <span class="stringliteral">&quot;by a fitter, thus the values returned are only valid after\n&quot;</span>
<a name="l00092"></a>00092            <span class="stringliteral">&quot;having done a fit.&quot;</span> )
<a name="l00093"></a>00093 
<a name="l00094"></a>00094     .def ( <span class="stringliteral">&quot;fit&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a6f3c61b75deee71b8d79fb23471b7587" title="Fits the function to the target DataRep.">PyFunctionRep::fitFunction</a>,
<a name="l00095"></a>00095            <span class="stringliteral">&quot;fit ( None ) -&gt; boolean\n&quot;</span>
<a name="l00096"></a>00096            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00097"></a>00097            <span class="stringliteral">&quot;Attempts to fit the the function to the target DataRep.\n&quot;</span>
<a name="l00098"></a>00098            <span class="stringliteral">&quot;Uses the currently selected fitter, unless one was explicitly\n&quot;</span>
<a name="l00099"></a>00099            <span class="stringliteral">&quot;set.  Note the fit is always done to linear sum if more than one\n&quot;</span>
<a name="l00100"></a>00100            <span class="stringliteral">&quot;function is on the data.&quot;</span> )
<a name="l00101"></a>00101 
<a name="l00102"></a>00102     .def ( <span class="stringliteral">&quot;setParameters&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#aa29bd1eeebfc189fafbbab2c7507e81f" title="Set the parameter values.">PyFunctionRep::setParameters</a>,
<a name="l00103"></a>00103            <span class="stringliteral">&quot;setParameters ( list ) -&gt; None\n&quot;</span>
<a name="l00104"></a>00104            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00105"></a>00105            <span class="stringliteral">&quot;Sets the function&#39;s parameter values.&quot;</span> )
<a name="l00106"></a>00106 
<a name="l00107"></a>00107     .def ( <span class="stringliteral">&quot;valueAt&quot;</span>, &amp;PyFunctionRep::operator(),
<a name="l00108"></a>00108            <span class="stringliteral">&quot;valueAt ( x ) -&gt; value\n&quot;</span>
<a name="l00109"></a>00109            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00110"></a>00110            <span class="stringliteral">&quot;Returns the function&#39;s value at given coordinate.&quot;</span> )
<a name="l00111"></a>00111 
<a name="l00112"></a>00112     .def ( <span class="stringliteral">&quot;chiSquared&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a192d2a91adc9495a4109c494f976ee4d" title="Returns the value of objective value.">PyFunctionRep::objectiveValue</a>,
<a name="l00113"></a>00113            <span class="stringliteral">&quot;chiSquare ( None ) -&gt; value\n&quot;</span>
<a name="l00114"></a>00114            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00115"></a>00115            <span class="stringliteral">&quot;Returns the Chi-Squared.&quot;</span> )
<a name="l00116"></a>00116 
<a name="l00117"></a>00117     .def ( <span class="stringliteral">&quot;objectiveValue&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a192d2a91adc9495a4109c494f976ee4d" title="Returns the value of objective value.">PyFunctionRep::objectiveValue</a>,
<a name="l00118"></a>00118            <span class="stringliteral">&quot;objectiveValue ( None ) -&gt; value\n&quot;</span>
<a name="l00119"></a>00119            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00120"></a>00120            <span class="stringliteral">&quot;Returns the objective Value that the fitter minimizes.\n&quot;</span>
<a name="l00121"></a>00121            <span class="stringliteral">&quot;Typically it is the Chi-Squared.&quot;</span> )
<a name="l00122"></a>00122 
<a name="l00123"></a>00123     .def ( <span class="stringliteral">&quot;degreesOfFreedom&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a3ffce635d63149b93f1af03bd3069efe" title="Returns the number of degrees-of-freedom.">PyFunctionRep::degreesOfFreedom</a>,
<a name="l00124"></a>00124            <span class="stringliteral">&quot;degressOfFreedom ( None ) -&gt; value\n&quot;</span>
<a name="l00125"></a>00125            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00126"></a>00126            <span class="stringliteral">&quot;Returns the number of degrees of freedom a fitter would have.&quot;</span> )
<a name="l00127"></a>00127 
<a name="l00128"></a>00128 <span class="comment">//     .def ( &quot;covarianceMatrix&quot;, </span>
<a name="l00129"></a>00129 <span class="comment">//         &amp;PyFunctionRep::covarianceMatrix,</span>
<a name="l00130"></a>00130 <span class="comment">//         return_value_policy &lt; copy_const_reference &gt; (),</span>
<a name="l00131"></a>00131 <span class="comment">//         &quot;Returns the covariance matrix&quot; )</span>
<a name="l00132"></a>00132 
<a name="l00133"></a>00133     .def ( <span class="stringliteral">&quot;setFixedFlags&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac50591297b951f99124f66a4b9b5e785" title="Set the fixed flags of the parameters.">PyFunctionRep::setFixedFlags</a>,
<a name="l00134"></a>00134            <span class="stringliteral">&quot;setFixedFlags ( list ) -&gt; None\n&quot;</span>
<a name="l00135"></a>00135            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00136"></a>00136            <span class="stringliteral">&quot;Set which parameters should be held fixed during fitting.&quot;</span> )
<a name="l00137"></a>00137 
<a name="l00138"></a>00138     .def ( <span class="stringliteral">&quot;setFitter&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a0f7fe92665086c5f11fac3d10a48f01f" title="Sets the Fitter with name in the FitterFactory.">PyFunctionRep::setFitter</a>,
<a name="l00139"></a>00139            <span class="stringliteral">&quot;setFitter ( string ) -&gt; None\n&quot;</span>
<a name="l00140"></a>00140            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00141"></a>00141             <span class="stringliteral">&quot;Sets the fitter by name from fitter factory.&quot;</span> )
<a name="l00142"></a>00142 
<a name="l00143"></a>00143     .def ( <span class="stringliteral">&quot;getFitterName&quot;</span>, &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a4531764cca878e5acc503a9224b04a4e" title="Returns the name of the Fitter.">PyFunctionRep::getFitterName</a>,
<a name="l00144"></a>00144            return_value_policy &lt; copy_const_reference &gt; (),
<a name="l00145"></a>00145            <span class="stringliteral">&quot;getFitterName ( None ) -&gt; string\n&quot;</span>
<a name="l00146"></a>00146            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00147"></a>00147            <span class="stringliteral">&quot;Returns the current fitter name.&quot;</span> )
<a name="l00148"></a>00148 
<a name="l00149"></a>00149     .def ( <span class="stringliteral">&quot;createResidualsDisplay&quot;</span>,
<a name="l00150"></a>00150            &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a35ed354a6459b6f6de4fbba1c91319d8" title="Returns an XY Plot of the residuals between the function and the data.">PyFunctionRep::createResidualsDisplay</a>,
<a name="l00151"></a>00151            return_value_policy &lt; manage_new_object &gt; (),
<a name="l00152"></a>00152            <span class="stringliteral">&quot;createResidualsDisplay ( None ) -&gt; Display\n&quot;</span>
<a name="l00153"></a>00153            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00154"></a>00154            <span class="stringliteral">&quot;Returns residuals Display object. The residuals display is an\n&quot;</span>
<a name="l00155"></a>00155            <span class="stringliteral">&quot;XY plot showing the difference between the function values and\n&quot;</span>
<a name="l00156"></a>00156            <span class="stringliteral">&quot;the target DataRep values.&quot;</span> )
<a name="l00157"></a>00157 
<a name="l00158"></a>00158     .def ( <span class="stringliteral">&quot;setFitRange&quot;</span>,
<a name="l00159"></a>00159            &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#a769b02c4581ec30a8b124b44655a8084" title="Sets the cut to limit range of fitting.">PyFunctionRep::setFitRange</a>,
<a name="l00160"></a>00160            <span class="stringliteral">&quot;setFitRange ( low, high ) -&gt; None\n&quot;</span>
<a name="l00161"></a>00161            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00162"></a>00162            <span class="stringliteral">&quot;Sets the range of the coordinate axis that is used for fitting.&quot;</span> )
<a name="l00163"></a>00163 
<a name="l00164"></a>00164     .def ( <span class="stringliteral">&quot;setFitRangeEnabled&quot;</span>,
<a name="l00165"></a>00165            &amp;<a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac408548db077607ec83a61902cf19d80" title="Sets use of a fitting range on or off.">PyFunctionRep::setFitRangeEnabled</a>,
<a name="l00166"></a>00166            <span class="stringliteral">&quot;setFitRange ( boolean ) -&gt; None\n&quot;</span>
<a name="l00167"></a>00167            <span class="stringliteral">&quot;\n&quot;</span>
<a name="l00168"></a>00168            <span class="stringliteral">&quot;Enabled use of the fit range&quot;</span> )
<a name="l00169"></a>00169            
<a name="l00170"></a>00170     ;
<a name="l00171"></a>00171 }
<a name="l00172"></a>00172 
<a name="l00173"></a>00173 } <span class="comment">// namespace Python</span>
<a name="l00174"></a>00174 } <span class="comment">// namespace hippodraw</span>
<a name="l00175"></a>00175 
<a name="l00176"></a>00176 <span class="keyword">using namespace </span>hippodraw;
<a name="l00177"></a>00177 
<a name="l00178"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#aed0c550f461744abb43e4960c2fe34ba">00178</a> PyFunctionRep::PyFunctionRep ( <span class="keyword">const</span> std::string &amp; name, <a class="code" href="classhippodraw_1_1PyDataRep.html" title="This class is the public interface the what the user sees as the DataRep object from...">PyDataRep</a> * rep )
<a name="l00179"></a>00179 {
<a name="l00180"></a>00180   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a> ();
<a name="l00181"></a>00181   <span class="keywordflow">try</span> {
<a name="l00182"></a>00182     <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00183"></a>00183     <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = rep -&gt; getDataRep ();
<a name="l00184"></a>00184     <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> = controller -&gt; createFunctionRep ( name, datarep );
<a name="l00185"></a>00185     <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a> = 0;
<a name="l00186"></a>00186   }
<a name="l00187"></a>00187   <span class="keywordflow">catch</span> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FactoryException.html" title="An exception class that is thrown when the factory fails to find the request class...">FactoryException</a> &amp; e ) {
<a name="l00188"></a>00188     <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00189"></a>00189     <span class="keywordflow">throw</span> e;
<a name="l00190"></a>00190   }
<a name="l00191"></a>00191   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00192"></a>00192 }
<a name="l00193"></a>00193 
<a name="l00194"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a6a4e9343cffedf4b98c9108daa88e641">00194</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#aed0c550f461744abb43e4960c2fe34ba" title="Constructor taking function name and target DataRep.">PyFunctionRep::PyFunctionRep</a> ( <a class="code" href="classhippodraw_1_1FunctionBase.html" title="A function that can be added to a DataRep and used in a fitter.">FunctionBase</a> * function, <a class="code" href="classhippodraw_1_1PyDataRep.html" title="This class is the public interface the what the user sees as the DataRep object from...">PyDataRep</a> * rep )
<a name="l00195"></a>00195 {
<a name="l00196"></a>00196   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a> ();
<a name="l00197"></a>00197   <span class="keywordflow">try</span> {
<a name="l00198"></a>00198     <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00199"></a>00199     <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = rep -&gt; getDataRep ();
<a name="l00200"></a>00200     <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> = controller -&gt; createFunctionRep ( function, datarep );
<a name="l00201"></a>00201     <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a> = 0;
<a name="l00202"></a>00202   }
<a name="l00203"></a>00203   <span class="keywordflow">catch</span> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FactoryException.html" title="An exception class that is thrown when the factory fails to find the request class...">FactoryException</a> &amp; e ) {
<a name="l00204"></a>00204     <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00205"></a>00205     <span class="keywordflow">throw</span> e;
<a name="l00206"></a>00206   }
<a name="l00207"></a>00207   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00208"></a>00208 }
<a name="l00209"></a>00209 
<a name="l00210"></a>00210 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#aed0c550f461744abb43e4960c2fe34ba" title="Constructor taking function name and target DataRep.">PyFunctionRep::</a>
<a name="l00211"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#ae9dccb9a2d4c828fb04f800ccde46a42">00211</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#aed0c550f461744abb43e4960c2fe34ba" title="Constructor taking function name and target DataRep.">PyFunctionRep</a> ( <a class="code" href="classhippodraw_1_1FunctionBase.html" title="A function that can be added to a DataRep and used in a fitter.">FunctionBase</a> * function )
<a name="l00212"></a>00212 {
<a name="l00213"></a>00213   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a> ();
<a name="l00214"></a>00214   <span class="keywordflow">try</span> {
<a name="l00215"></a>00215     <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00216"></a>00216     <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> = controller -&gt; createFunctionRep ( function, 0 );
<a name="l00217"></a>00217     <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a> = 0;
<a name="l00218"></a>00218   }
<a name="l00219"></a>00219   <span class="keywordflow">catch</span> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1FactoryException.html" title="An exception class that is thrown when the factory fails to find the request class...">FactoryException</a> &amp; e ) {
<a name="l00220"></a>00220     <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00221"></a>00221     <span class="keywordflow">throw</span> e;
<a name="l00222"></a>00222   }
<a name="l00223"></a>00223   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00224"></a>00224 }
<a name="l00225"></a>00225 
<a name="l00226"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a286267c8e54fefa4a9490a350b8c2f1b">00226</a> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a286267c8e54fefa4a9490a350b8c2f1b" title="Returns the wrapped FunctionRep object.">PyFunctionRep::getRep</a> ()<span class="keyword"> const</span>
<a name="l00227"></a>00227 <span class="keyword"></span>{
<a name="l00228"></a>00228   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a>;
<a name="l00229"></a>00229 }
<a name="l00230"></a>00230 
<a name="l00231"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a328eae92d850302abb4dff0d4a0bb720">00231</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a328eae92d850302abb4dff0d4a0bb720" title="Adds the function on to the display.">PyFunctionRep::addTo</a> ( <a class="code" href="classhippodraw_1_1QtDisplay.html" title="Qt Displays wraps a derived class of PlotterBase.">QtDisplay</a> * display )
<a name="l00232"></a>00232 {
<a name="l00233"></a>00233   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00234"></a>00234   <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00235"></a>00235   <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a> = display-&gt;<a class="code" href="classhippodraw_1_1QtDisplay.html#aea050d6d675376d2ee2899c07fda4c4f" title="Returns the wrapped display object.">display</a> ();
<a name="l00236"></a>00236 
<a name="l00237"></a>00237   <span class="keywordflow">try</span> { 
<a name="l00238"></a>00238     controller-&gt;<a class="code" href="classhippodraw_1_1FunctionController.html#a4d83730714f45d27cacddcb33c41b605" title="Adds a function to the first DataRep object of the plotter.">addFunction</a> ( <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>, <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> );
<a name="l00239"></a>00239     <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a> -&gt; setActivePlot ( -1, <span class="keyword">true</span> );
<a name="l00240"></a>00240   }
<a name="l00241"></a>00241   <span class="keywordflow">catch</span> ( <span class="keyword">const</span> std::runtime_error &amp; e ) {
<a name="l00242"></a>00242     <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00243"></a>00243     <span class="keywordflow">throw</span> e;
<a name="l00244"></a>00244   }
<a name="l00245"></a>00245   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00246"></a>00246 }
<a name="l00247"></a>00247 
<a name="l00248"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a1047155d04f6fa2965ab2c46871c3c7e">00248</a> <span class="keyword">const</span> vector &lt; std::string &gt; &amp;  <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a1047155d04f6fa2965ab2c46871c3c7e" title="Returns the names of the parameters.">PyFunctionRep::parmNames</a> ()<span class="keyword"> const</span>
<a name="l00249"></a>00249 <span class="keyword"></span>{
<a name="l00250"></a>00250   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00251"></a>00251   <span class="keyword">const</span> vector &lt; std::string &gt; &amp; <a class="codeRef" doxygen="Minuit.tag:http://seal.web.cern.ch/seal/MathLibs/Minuit/html/" href="http://seal.web.cern.ch/seal/MathLibs/Minuit/html/classvec.html">vec</a> = <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a>-&gt;<a class="code" href="classhippodraw_1_1FunctionRep.html#a5cd61d6494588c53f64ea1b4497a58e8" title="Returns the names of the parameters for the function represented by this object.">parmNames</a>();
<a name="l00252"></a>00252   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00253"></a>00253 
<a name="l00254"></a>00254   <span class="keywordflow">return</span> vec;
<a name="l00255"></a>00255 }
<a name="l00256"></a>00256 
<a name="l00257"></a>00257 
<a name="l00258"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a8feaee11443a07a66049bd4fee2a7689">00258</a> <span class="keyword">const</span> vector &lt; double &gt; &amp;  <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a8feaee11443a07a66049bd4fee2a7689" title="Returns the current values of the parameters.">PyFunctionRep::parameters</a> ()<span class="keyword"> const</span>
<a name="l00259"></a>00259 <span class="keyword"></span>{
<a name="l00260"></a>00260   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00261"></a>00261   <span class="keyword">const</span> vector &lt; double &gt; &amp; <a class="codeRef" doxygen="Minuit.tag:http://seal.web.cern.ch/seal/MathLibs/Minuit/html/" href="http://seal.web.cern.ch/seal/MathLibs/Minuit/html/classvec.html">vec</a> = <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a>-&gt;<a class="code" href="classhippodraw_1_1FunctionRep.html#a8feaee11443a07a66049bd4fee2a7689" title="Returns the current function parameter values.">parameters</a> ();
<a name="l00262"></a>00262   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00263"></a>00263 
<a name="l00264"></a>00264   <span class="keywordflow">return</span> vec;
<a name="l00265"></a>00265 }
<a name="l00266"></a>00266 
<a name="l00267"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a48e275e03e4a6af662d3f3314a71713c">00267</a> <span class="keyword">const</span> vector &lt; double &gt; &amp;  <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a48e275e03e4a6af662d3f3314a71713c" title="Returns the principle error values associated with the parameters.">PyFunctionRep::principleErrors</a> ()<span class="keyword"> const</span>
<a name="l00268"></a>00268 <span class="keyword"></span>{
<a name="l00269"></a>00269   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00270"></a>00270   <span class="keyword">const</span> vector &lt; double &gt; &amp; <a class="codeRef" doxygen="Minuit.tag:http://seal.web.cern.ch/seal/MathLibs/Minuit/html/" href="http://seal.web.cern.ch/seal/MathLibs/Minuit/html/classvec.html">vec</a> = <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> -&gt; <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a48e275e03e4a6af662d3f3314a71713c" title="Returns the principle error values associated with the parameters.">principleErrors</a>();
<a name="l00271"></a>00271   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00272"></a>00272   
<a name="l00273"></a>00273   <span class="keywordflow">return</span> vec;  
<a name="l00274"></a>00274 }
<a name="l00275"></a>00275 
<a name="l00276"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#aa29bd1eeebfc189fafbbab2c7507e81f">00276</a> <span class="keywordtype">void</span> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#aa29bd1eeebfc189fafbbab2c7507e81f" title="Set the parameter values.">PyFunctionRep::setParameters</a> ( <span class="keyword">const</span> std::vector&lt;double&gt; &amp; params )
<a name="l00277"></a>00277 {
<a name="l00278"></a>00278   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00279"></a>00279   <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a>-&gt;<a class="code" href="classhippodraw_1_1FunctionRep.html#aa29bd1eeebfc189fafbbab2c7507e81f" title="Set the parameter values by hand.">setParameters</a>(params);
<a name="l00280"></a>00280   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00281"></a>00281 }
<a name="l00282"></a>00282 
<a name="l00283"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a6f3c61b75deee71b8d79fb23471b7587">00283</a> <span class="keywordtype">bool</span> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a6f3c61b75deee71b8d79fb23471b7587" title="Fits the function to the target DataRep.">PyFunctionRep::fitFunction</a> ()
<a name="l00284"></a>00284 {
<a name="l00285"></a>00285   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00286"></a>00286   <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00287"></a>00287   <span class="keywordtype">bool</span> ok = controller -&gt; <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a6f3c61b75deee71b8d79fb23471b7587" title="Fits the function to the target DataRep.">fitFunction</a> ( <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>, <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> );
<a name="l00288"></a>00288   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00289"></a>00289 
<a name="l00290"></a>00290   <span class="keywordflow">return</span> ok;
<a name="l00291"></a>00291 }
<a name="l00292"></a>00292 
<a name="l00293"></a>00293 <span class="keywordtype">double</span>
<a name="l00294"></a>00294 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a8b01f5831c9306311d6385888986bd70" title="Returns the function value at a given x.">PyFunctionRep::</a>
<a name="l00295"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a8b01f5831c9306311d6385888986bd70">00295</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a8b01f5831c9306311d6385888986bd70" title="Returns the function value at a given x.">operator () </a>( <span class="keywordtype">double</span> x )
<a name="l00296"></a>00296 {
<a name="l00297"></a>00297   <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00298"></a>00298   <a class="code" href="classhippodraw_1_1FunctionRep.html" title="A derived class of DataRep which is a base class for displaying a function.">FunctionRep</a> * rep = controller-&gt;<a class="code" href="classhippodraw_1_1FunctionController.html#afc445e1954939766b1f592ac89da8889" title="Returns the CompositeFunctionRep for which rep is a member if it is one, otherwise...">getComposite</a> ( <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>, <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> );
<a name="l00299"></a>00299   <a class="code" href="classhippodraw_1_1FunctionBase.html" title="A function that can be added to a DataRep and used in a fitter.">FunctionBase</a> * function = 0;
<a name="l00300"></a>00300   <span class="keywordflow">if</span> ( rep != 0 ) {
<a name="l00301"></a>00301     function = rep-&gt;<a class="code" href="classhippodraw_1_1FunctionRep.html#ad4b11c2e6c3e1a2b7e7c985ccd8e7b3d" title="Returns the actual function, a FunctionBase derived class.">getFunction</a> ();
<a name="l00302"></a>00302   }
<a name="l00303"></a>00303   <span class="keywordflow">else</span> {
<a name="l00304"></a>00304     function = <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a>-&gt;<a class="code" href="classhippodraw_1_1FunctionRep.html#ad4b11c2e6c3e1a2b7e7c985ccd8e7b3d" title="Returns the actual function, a FunctionBase derived class.">getFunction</a>();
<a name="l00305"></a>00305   }
<a name="l00306"></a>00306 
<a name="l00307"></a>00307   <span class="keywordflow">return</span> function -&gt;operator() ( x );
<a name="l00308"></a>00308  }
<a name="l00309"></a>00309 
<a name="l00315"></a>00315 <span class="keywordtype">double</span>
<a name="l00316"></a>00316 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a192d2a91adc9495a4109c494f976ee4d" title="Returns the value of objective value.">PyFunctionRep::</a>
<a name="l00317"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a192d2a91adc9495a4109c494f976ee4d">00317</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a192d2a91adc9495a4109c494f976ee4d" title="Returns the value of objective value.">objectiveValue</a>()
<a name="l00318"></a>00318 {
<a name="l00319"></a>00319    <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00320"></a>00320    <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00321"></a>00321    <span class="keywordtype">double</span> value;
<a name="l00322"></a>00322    <span class="keywordflow">if</span> (<a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>) {
<a name="l00323"></a>00323      <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1DataRep.html" title="The base class for data representations.">DataRep</a> * datarep = <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a> -&gt; getDataRep ( 0 );
<a name="l00324"></a>00324       value = controller-&gt;<a class="code" href="classhippodraw_1_1FunctionController.html#a3f097fd7bf077fb538fb17594cef88fb" title="Returns the value of the objective function.">getObjectiveValue</a>( <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>, datarep );
<a name="l00325"></a>00325    } <span class="keywordflow">else</span> {
<a name="l00326"></a>00326       value = 0;
<a name="l00327"></a>00327    }
<a name="l00328"></a>00328    <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00329"></a>00329 
<a name="l00330"></a>00330    <span class="keywordflow">return</span> value;
<a name="l00331"></a>00331 }
<a name="l00332"></a>00332 <span class="keyword">const</span> vector &lt; vector &lt; double &gt; &gt; &amp;
<a name="l00333"></a>00333 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a37abaa7d5a924547729dba23a873da56" title="Returns the covariance matrix from the last fit.">PyFunctionRep::</a>
<a name="l00334"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a37abaa7d5a924547729dba23a873da56">00334</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a37abaa7d5a924547729dba23a873da56" title="Returns the covariance matrix from the last fit.">covarianceMatrix</a> ( )
<a name="l00335"></a>00335 {
<a name="l00336"></a>00336   <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00337"></a>00337   <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00338"></a>00338   <span class="keyword">const</span> vector &lt; vector &lt; double &gt; &gt; &amp; covariance 
<a name="l00339"></a>00339     = controller -&gt; getCovarianceMatrix ( <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a> );
<a name="l00340"></a>00340   <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00341"></a>00341 
<a name="l00342"></a>00342   <span class="keywordflow">return</span> covariance;
<a name="l00343"></a>00343 }
<a name="l00344"></a>00344 
<a name="l00345"></a>00345 <span class="keywordtype">int</span>
<a name="l00346"></a>00346 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a3ffce635d63149b93f1af03bd3069efe" title="Returns the number of degrees-of-freedom.">PyFunctionRep::</a>
<a name="l00347"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a3ffce635d63149b93f1af03bd3069efe">00347</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a3ffce635d63149b93f1af03bd3069efe" title="Returns the number of degrees-of-freedom.">degreesOfFreedom</a> ()
<a name="l00348"></a>00348 {
<a name="l00349"></a>00349    <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00350"></a>00350    <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00351"></a>00351    <span class="keywordtype">int</span> value = 0;
<a name="l00352"></a>00352    <span class="keywordflow">if</span> (<a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>) {
<a name="l00353"></a>00353       value = controller-&gt;<a class="code" href="classhippodraw_1_1FunctionController.html#a8e623a274b439f1e6f48fc4baeb84a9c" title="Returns the degrees of freedom.">getDegreesOfFreedom</a>(<a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>);
<a name="l00354"></a>00354    }
<a name="l00355"></a>00355    <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00356"></a>00356 
<a name="l00357"></a>00357    <span class="keywordflow">return</span> value;
<a name="l00358"></a>00358 }
<a name="l00359"></a>00359 
<a name="l00360"></a>00360 <span class="keywordtype">void</span>
<a name="l00361"></a>00361 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac50591297b951f99124f66a4b9b5e785" title="Set the fixed flags of the parameters.">PyFunctionRep::</a>
<a name="l00362"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac50591297b951f99124f66a4b9b5e785">00362</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac50591297b951f99124f66a4b9b5e785" title="Set the fixed flags of the parameters.">setFixedFlags</a> ( <span class="keyword">const</span> std::vector &lt; int &gt; &amp; flags )
<a name="l00363"></a>00363 {
<a name="l00364"></a>00364    <a class="code" href="classhippodraw_1_1PyApp.html#aa81aed607133209dade63a226818224d" title="Obtains a lock on the application&amp;#39;s mutex.">PyApp::lock</a>();
<a name="l00365"></a>00365 
<a name="l00366"></a>00366    <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a>-&gt;<a class="code" href="classhippodraw_1_1FunctionRep.html#ac50591297b951f99124f66a4b9b5e785" title="Set the parameters that are to be held fixed during a fit.">setFixedFlags</a> ( flags );
<a name="l00367"></a>00367 
<a name="l00368"></a>00368    <a class="code" href="classhippodraw_1_1PyApp.html#a9278be8203e1c42e2619179882ae4403" title="Releases the lock on the application&amp;#39;s mutex.">PyApp::unlock</a> ();
<a name="l00369"></a>00369 }
<a name="l00370"></a>00370 
<a name="l00371"></a>00371 <span class="keywordtype">void</span>
<a name="l00372"></a>00372 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a0f7fe92665086c5f11fac3d10a48f01f" title="Sets the Fitter with name in the FitterFactory.">PyFunctionRep::</a>
<a name="l00373"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a0f7fe92665086c5f11fac3d10a48f01f">00373</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a0f7fe92665086c5f11fac3d10a48f01f" title="Sets the Fitter with name in the FitterFactory.">setFitter</a> ( <span class="keyword">const</span> std::string &amp; name )
<a name="l00374"></a>00374 {
<a name="l00375"></a>00375   <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a> ();
<a name="l00376"></a>00376   controller -&gt; <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a0f7fe92665086c5f11fac3d10a48f01f" title="Sets the Fitter with name in the FitterFactory.">setFitter</a> ( <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a>, name );
<a name="l00377"></a>00377 }
<a name="l00378"></a>00378 
<a name="l00379"></a>00379 <span class="keyword">const</span> std::string &amp;
<a name="l00380"></a>00380 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a4531764cca878e5acc503a9224b04a4e" title="Returns the name of the Fitter.">PyFunctionRep::</a>
<a name="l00381"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a4531764cca878e5acc503a9224b04a4e">00381</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a4531764cca878e5acc503a9224b04a4e" title="Returns the name of the Fitter.">getFitterName</a> ( )<span class="keyword"> const</span>
<a name="l00382"></a>00382 <span class="keyword"></span>{
<a name="l00383"></a>00383   <span class="keywordflow">return</span> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> -&gt; <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a4531764cca878e5acc503a9224b04a4e" title="Returns the name of the Fitter.">getFitterName</a> ();
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385 
<a name="l00386"></a>00386 <a class="code" href="classhippodraw_1_1QtDisplay.html" title="Qt Displays wraps a derived class of PlotterBase.">QtDisplay</a> *
<a name="l00387"></a>00387 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a35ed354a6459b6f6de4fbba1c91319d8" title="Returns an XY Plot of the residuals between the function and the data.">PyFunctionRep::</a>
<a name="l00388"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a35ed354a6459b6f6de4fbba1c91319d8">00388</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a35ed354a6459b6f6de4fbba1c91319d8" title="Returns an XY Plot of the residuals between the function and the data.">createResidualsDisplay</a> ()<span class="keyword"> const</span>
<a name="l00389"></a>00389 <span class="keyword"></span>{
<a name="l00390"></a>00390   <a class="code" href="classhippodraw_1_1FunctionController.html" title="A singleton class is the interface between an application and the list of FunctionRep...">FunctionController</a> * controller = <a class="code" href="classhippodraw_1_1FunctionController.html#add005d3cdf4fc316aa46841a275f046d" title="Returns the pointer to the singleton instance.">FunctionController::instance</a>();
<a name="l00391"></a>00391   <a class="code" href="classhippodraw_1_1PlotterBase.html" title="The base class for the PlotterBase hierarchy.">PlotterBase</a> * plotter 
<a name="l00392"></a>00392     = controller -&gt; <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a35ed354a6459b6f6de4fbba1c91319d8" title="Returns an XY Plot of the residuals between the function and the data.">createResidualsDisplay</a> ( <a class="code" href="classhippodraw_1_1PyFunctionRep.html#af592292899662dd0b006461b098b620e" title="The PlotterBase on which the FunctionRep is displayed.">m_target</a>, <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> );
<a name="l00393"></a>00393   <a class="code" href="classhippodraw_1_1QtDisplay.html" title="Qt Displays wraps a derived class of PlotterBase.">QtDisplay</a> * display = <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1QtDisplay.html" title="Qt Displays wraps a derived class of PlotterBase.">QtDisplay</a> ( plotter );
<a name="l00394"></a>00394 
<a name="l00395"></a>00395   <span class="keywordflow">return</span> display;
<a name="l00396"></a>00396 }
<a name="l00397"></a>00397 
<a name="l00398"></a>00398 <span class="keywordtype">void</span>
<a name="l00399"></a>00399 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a769b02c4581ec30a8b124b44655a8084" title="Sets the cut to limit range of fitting.">PyFunctionRep::</a>
<a name="l00400"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#a769b02c4581ec30a8b124b44655a8084">00400</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a769b02c4581ec30a8b124b44655a8084" title="Sets the cut to limit range of fitting.">setFitRange</a> ( <span class="keywordtype">double</span> low, <span class="keywordtype">double</span> high )
<a name="l00401"></a>00401 {
<a name="l00402"></a>00402   <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1Range.html" title="Expresses a range of values.">Range</a> range ( low, high );
<a name="l00403"></a>00403 
<a name="l00404"></a>00404   <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> -&gt; setCutRange ( range );
<a name="l00405"></a>00405 }
<a name="l00406"></a>00406 
<a name="l00407"></a>00407 <span class="keywordtype">void</span>
<a name="l00408"></a>00408 <a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac408548db077607ec83a61902cf19d80" title="Sets use of a fitting range on or off.">PyFunctionRep::</a>
<a name="l00409"></a><a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac408548db077607ec83a61902cf19d80">00409</a> <a class="code" href="classhippodraw_1_1PyFunctionRep.html#ac408548db077607ec83a61902cf19d80" title="Sets use of a fitting range on or off.">setFitRangeEnabled</a> ( <span class="keywordtype">bool</span> yes )
<a name="l00410"></a>00410 {
<a name="l00411"></a>00411   <a class="code" href="classhippodraw_1_1PyFunctionRep.html#a53b557c7c91073b6504225c238b0a8bf" title="The wrapped FunctionRep object.">m_rep</a> -&gt; setCutRange ( yes );
<a name="l00412"></a>00412 }
</pre></div></div>
<hr size="1"><address style="align: right;"><small>
Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
</a> </small></address>
</body>
</html>