Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 4301

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>mrpt::math::CMonteCarlo Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> &gt; <b>C++ reference</b> </div>
<div align="right">
<a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a>
</div>
<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespacemrpt.html">mrpt</a>      </li>
      <li class="navelem"><a class="el" href="namespacemrpt_1_1math.html">math</a>      </li>
      <li class="navelem"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html">CMonteCarlo</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">mrpt::math::CMonteCarlo Class Reference<div class="ingroups"><a class="el" href="group__mrpt__base__grp.html">[mrpt-base]</a></div></div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="mrpt::math::CMonteCarlo" --><hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Montecarlo simulation for experiments in 1D. </p>
<p>Template arguments are:</p>
<ul>
<li>T: base type, i.e., if an experiment needs to generate random points, then T may be a <a class="el" href="structmrpt_1_1math_1_1_t_point3_d.html" title="Lightweight 3D point.">TPoint3D</a>, and so on.</li>
<li>NUM: the numeric type used to represent the error. Usually, double.</li>
<li>OTHER: an intermediate type, used especially when testing inverse functions. Leave as int or double if you don't use it.</li>
</ul>
<p>HOW TO USE THIS CLASS:</p>
<ul>
<li>Create an instance of the class.</li>
<li>Refill the "valueGenerator" member with an appropriate function.</li>
<li>If your experiment calculates the error directly from the base value, then refill the "errorFun1" member.</li>
<li>Otherwise, if your experiment involves the calculation of some value whom with the experimental function is compared, refill "intermediateFun" and "errorFun2".</li>
<li>Refill only on of the alternatives. </li>
</ul>
</div>
<p><code>#include &lt;<a class="el" href="_c_monte_carlo_8h_source.html">mrpt/math/CMonteCarlo.h</a>&gt;</code></p>

<p><a href="classmrpt_1_1math_1_1_c_monte_carlo-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo_1_1_c_statistical_analyzer.html">CStatisticalAnalyzer</a></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#a117065761f4de1f5d6cf849da80716d8">CMonteCarlo</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NUM&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#a797c9cab21c6f184bf4ef4a45033b971">doExperiment</a> (size_t N, double &amp;time, bool showInWindow=false)</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">T(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#ad0d393672422519515eb38cba1158b57">valueGenerator</a> )(<a class="el" href="classmrpt_1_1random_1_1_c_random_generator.html">mrpt::random::CRandomGenerator</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NUM(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#afa1b1612016746ace59829b15cd99ea1">errorFun1</a> )(const T &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">OTHER(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#a604d64e1aa6689797dae936618fe151c">intermediateFun</a> )(const T &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">NUM(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#ace9e5c36f678df6049b83945028288e9">errorFun2</a> )(const T &amp;, const OTHER &amp;)</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classmrpt_1_1random_1_1_c_random_generator.html">mrpt::random::CRandomGenerator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#a3e273f0957e56ca633b738c685a7d7fb">gen</a></td></tr>
</table>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a117065761f4de1f5d6cf849da80716d8"></a><!-- doxytag: member="mrpt::math::CMonteCarlo::CMonteCarlo" ref="a117065761f4de1f5d6cf849da80716d8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mrpt::math::CMonteCarlo::CMonteCarlo </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_monte_carlo_8h_source.html#l00095">95</a> of file <a class="el" href="_c_monte_carlo_8h_source.html">CMonteCarlo.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a797c9cab21c6f184bf4ef4a45033b971"></a><!-- doxytag: member="mrpt::math::CMonteCarlo::doExperiment" ref="a797c9cab21c6f184bf4ef4a45033b971" args="(size_t N, double &amp;time, bool showInWindow=false)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NUM mrpt::math::CMonteCarlo::doExperiment </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double &amp;&#160;</td>
          <td class="paramname"><em>time</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>showInWindow</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_monte_carlo_8h_source.html#l00096">96</a> of file <a class="el" href="_c_monte_carlo_8h_source.html">CMonteCarlo.h</a>.</p>

<p>References <a class="el" href="_c_monte_carlo_8h_source.html#l00089">valueGenerator</a>, <a class="el" href="_c_monte_carlo_8h_source.html#l00060">gen</a>, <a class="el" href="_c_monte_carlo_8h_source.html#l00091">errorFun1</a>, <a class="el" href="classmrpt_1_1utils_1_1_c_tic_tac.html#aae7e29d8fc37e441960004c6ffe31e81">mrpt::utils::CTicTac::Tic()</a>, <a class="el" href="classmrpt_1_1utils_1_1_c_tic_tac.html#a7eef1a30d6fa540ef116cb978db7aed8">mrpt::utils::CTicTac::Tac()</a>, <a class="el" href="_c_monte_carlo_8h_source.html#l00093">intermediateFun</a>, and <a class="el" href="_c_monte_carlo_8h_source.html#l00094">errorFun2</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="afa1b1612016746ace59829b15cd99ea1"></a><!-- doxytag: member="mrpt::math::CMonteCarlo::errorFun1" ref="afa1b1612016746ace59829b15cd99ea1" args=")(const T &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NUM(* <a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#afa1b1612016746ace59829b15cd99ea1">mrpt::math::CMonteCarlo::errorFun1</a>)(const T &amp;)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_monte_carlo_8h_source.html#l00091">91</a> of file <a class="el" href="_c_monte_carlo_8h_source.html">CMonteCarlo.h</a>.</p>

<p>Referenced by <a class="el" href="_c_monte_carlo_8h_source.html#l00096">doExperiment()</a>.</p>

</div>
</div>
<a class="anchor" id="ace9e5c36f678df6049b83945028288e9"></a><!-- doxytag: member="mrpt::math::CMonteCarlo::errorFun2" ref="ace9e5c36f678df6049b83945028288e9" args=")(const T &amp;, const OTHER &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">NUM(* <a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#ace9e5c36f678df6049b83945028288e9">mrpt::math::CMonteCarlo::errorFun2</a>)(const T &amp;, const OTHER &amp;)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_monte_carlo_8h_source.html#l00094">94</a> of file <a class="el" href="_c_monte_carlo_8h_source.html">CMonteCarlo.h</a>.</p>

<p>Referenced by <a class="el" href="_c_monte_carlo_8h_source.html#l00096">doExperiment()</a>.</p>

</div>
</div>
<a class="anchor" id="a3e273f0957e56ca633b738c685a7d7fb"></a><!-- doxytag: member="mrpt::math::CMonteCarlo::gen" ref="a3e273f0957e56ca633b738c685a7d7fb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classmrpt_1_1random_1_1_c_random_generator.html">mrpt::random::CRandomGenerator</a> <a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#a3e273f0957e56ca633b738c685a7d7fb">mrpt::math::CMonteCarlo::gen</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_monte_carlo_8h_source.html#l00060">60</a> of file <a class="el" href="_c_monte_carlo_8h_source.html">CMonteCarlo.h</a>.</p>

<p>Referenced by <a class="el" href="_c_monte_carlo_8h_source.html#l00096">doExperiment()</a>.</p>

</div>
</div>
<a class="anchor" id="a604d64e1aa6689797dae936618fe151c"></a><!-- doxytag: member="mrpt::math::CMonteCarlo::intermediateFun" ref="a604d64e1aa6689797dae936618fe151c" args=")(const T &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">OTHER(* <a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#a604d64e1aa6689797dae936618fe151c">mrpt::math::CMonteCarlo::intermediateFun</a>)(const T &amp;)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_monte_carlo_8h_source.html#l00093">93</a> of file <a class="el" href="_c_monte_carlo_8h_source.html">CMonteCarlo.h</a>.</p>

<p>Referenced by <a class="el" href="_c_monte_carlo_8h_source.html#l00096">doExperiment()</a>.</p>

</div>
</div>
<a class="anchor" id="ad0d393672422519515eb38cba1158b57"></a><!-- doxytag: member="mrpt::math::CMonteCarlo::valueGenerator" ref="ad0d393672422519515eb38cba1158b57" args=")(mrpt::random::CRandomGenerator &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">T(* <a class="el" href="classmrpt_1_1math_1_1_c_monte_carlo.html#ad0d393672422519515eb38cba1158b57">mrpt::math::CMonteCarlo::valueGenerator</a>)(<a class="el" href="classmrpt_1_1random_1_1_c_random_generator.html">mrpt::random::CRandomGenerator</a> &amp;)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_monte_carlo_8h_source.html#l00089">89</a> of file <a class="el" href="_c_monte_carlo_8h_source.html">CMonteCarlo.h</a>.</p>

<p>Referenced by <a class="el" href="_c_monte_carlo_8h_source.html#l00096">doExperiment()</a>.</p>

</div>
</div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>