Sophie

Sophie

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

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::bayes::CParticleFilterCapable 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_1bayes.html">bayes</a>      </li>
      <li class="navelem"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html">CParticleFilterCapable</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#pri-static-attribs">Static Private Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">mrpt::bayes::CParticleFilterCapable 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::bayes::CParticleFilterCapable" --><hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This virtual class defines the interface that any particles based PDF class must implement in order to be executed by a <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter.html" title="This class acts as a common interface to the different interfaces (see CParticleFilter::TParticleFilt...">mrpt::bayes::CParticleFilter</a>. </p>
<p>See the <a href="http://www.mrpt.org/Particle_Filter_Tutorial">Particle Filter tutorial</a> explaining how to use the particle filter-related classes. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter.html" title="This class acts as a common interface to the different interfaces (see CParticleFilter::TParticleFilt...">CParticleFilter</a>, <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_data.html" title="This template class declares the array of particles and its internal data, managing some memory-relat...">CParticleFilterData</a> </dd></dl>
</div>
<p><code>#include &lt;<a class="el" href="_c_particle_filter_capable_8h_source.html">mrpt/bayes/CParticleFilterCapable.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for mrpt::bayes::CParticleFilterCapable:</div>
<div class="dyncontent">
<div class="center"><img src="classmrpt_1_1bayes_1_1_c_particle_filter_capable__inherit__graph.png" border="0" usemap="#mrpt_1_1bayes_1_1_c_particle_filter_capable_inherit__map" alt="Inheritance graph"/></div>
<map name="mrpt_1_1bayes_1_1_c_particle_filter_capable_inherit__map" id="mrpt_1_1bayes_1_1_c_particle_filter_capable_inherit__map">
<area shape="rect" id="node3" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html" title="This class is used in HMT&#45;SLAM to represent each of the Local Metric Hypotheses (LMHs)." alt="" coords="286,5,543,32"/><area shape="rect" id="node5" href="classmrpt_1_1poses_1_1_c_pose3_d_p_d_f_particles.html" title="Declares a class that represents a Probability Density function (PDF) of a 3D pose." alt="" coords="297,56,532,83"/><area shape="rect" id="node9" href="classmrpt_1_1poses_1_1_c_pose_p_d_f_particles.html" title="Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x..." alt="" coords="306,107,523,133"/><area shape="rect" id="node13" href="classmrpt_1_1slam_1_1_c_multi_metric_map_p_d_f.html" title="Declares a class that represents a Rao&#45;Blackwellized set of particles for solving the SLAM problem (T..." alt="" coords="305,157,524,184"/><area shape="rect" id="node7" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization3_d.html" title="Declares a class that represents a Probability Density Function (PDF) over a 3D pose (x..." alt="" coords="593,56,847,83"/><area shape="rect" id="node11" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization2_d.html" title="Declares a class that represents a Probability Density Function (PDF) over a 2D pose (x..." alt="" coords="593,107,847,133"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classmrpt_1_1bayes_1_1_c_particle_filter_capable-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">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_capable_1_1_t_fast_draw_aux_vars.html">TFastDrawAuxVars</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Auxiliary vectors, see <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a02d7ff724a4b73d449a0f5dc28216e63" title="Prepares data structures for calling fastDrawSample method next.">CParticleFilterCapable::prepareFastDrawSample</a> for more information.  <a href="structmrpt_1_1bayes_1_1_c_particle_filter_capable_1_1_t_fast_draw_aux_vars.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef double(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6a77d17782b7527dd6cdd4e024ac9f1b">TParticleProbabilityEvaluator</a> )(const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options, const <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html">CParticleFilterCapable</a> *obj, size_t index, const void *action, const void *observation)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A callback function type for evaluating the probability of m_particles of being selected, used in "fastDrawSample".  <a href="#a6a77d17782b7527dd6cdd4e024ac9f1b"></a><br/></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_1bayes_1_1_c_particle_filter_capable.html#a962214fbf62e0ced82450f032c3b65d9">CParticleFilterCapable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a7a75d65311441163eba4dacc2a596174">~CParticleFilterCapable</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="#a7a75d65311441163eba4dacc2a596174"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a02d7ff724a4b73d449a0f5dc28216e63">prepareFastDrawSample</a> (const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options, <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6a77d17782b7527dd6cdd4e024ac9f1b">TParticleProbabilityEvaluator</a> partEvaluator=defaultEvaluator, const void *action=NULL, const void *observation=NULL) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Prepares data structures for calling fastDrawSample method next.  <a href="#a02d7ff724a4b73d449a0f5dc28216e63"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#afc4f93d0568e52e91227348baf7b242f">fastDrawSample</a> (const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Draws a random sample from the particle filter, in such a way that each particle has a probability proportional to its weight (in the standard PF algorithm).  <a href="#afc4f93d0568e52e91227348baf7b242f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6ca16ca0217cdac4b586df5df9cdaea2">getW</a> (size_t i) const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Access to i'th particle (logarithm) weight, where first one is index 0.  <a href="#a6ca16ca0217cdac4b586df5df9cdaea2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#aecb3d0c17d29b4027a7eede17d2e0b8e">setW</a> (size_t i, double w)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Modifies i'th particle (logarithm) weight, where first one is index 0.  <a href="#aecb3d0c17d29b4027a7eede17d2e0b8e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a70664baf3816bce82f06933270a5c8d1">particlesCount</a> () const =0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the m_particles count.  <a href="#a70664baf3816bce82f06933270a5c8d1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0b464ec72adbfc8a9aea3cf4aa6bdf9e">prediction_and_update</a> (const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *action, const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *observation, const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the prediction stage of the Particle Filter.  <a href="#a0b464ec72adbfc8a9aea3cf4aa6bdf9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a9f8e1f63a625dedcc5e5209dde04203f">performSubstitution</a> (const <a class="el" href="classstd_1_1vector.html">std::vector</a>&lt; size_t &gt; &amp;indx)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the substitution for internal use of resample in particle filter algorithm, don't call it directly.  <a href="#a9f8e1f63a625dedcc5e5209dde04203f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a675b747939b1945bd16d6cee3f968c14">normalizeWeights</a> (double *out_max_log_w=NULL)=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Normalize the (logarithmic) weights, such as the maximum weight is zero.  <a href="#a675b747939b1945bd16d6cee3f968c14"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#afc87a617ea5582e4ba80bb3c065c4785">ESS</a> ()=0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the normalized ESS (Estimated Sample Size), in the range [0,1].  <a href="#afc87a617ea5582e4ba80bb3c065c4785"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a72a3c11af8ca4b021ced0568d952c664">performResampling</a> (const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a resample of the m_particles, using the method selected in the constructor.  <a href="#a72a3c11af8ca4b021ced0568d952c664"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#aca935576d796515781dfd8456f4c3025">defaultEvaluator</a> (const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options, const <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html">CParticleFilterCapable</a> *obj, size_t index, const void *action, const void *observation)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The default evaluator function, which simply returns the particle weight.  <a href="#aca935576d796515781dfd8456f4c3025"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#ae7468df83aa6ac4c3d616167036fd6d0">computeResampling</a> (<a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter.html#a5a2e5c42fba6719b5f2f4b8fa1f4154c">CParticleFilter::TParticleResamplingAlgorithm</a> method, const <a class="el" href="namespacemrpt.html#a4a6aab2c98368ca6b554c04f8fe84cfb">vector_double</a> &amp;in_logWeights, <a class="el" href="classstd_1_1vector.html">std::vector</a>&lt; size_t &gt; &amp;out_indexes)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A static method to perform the computation of the samples resulting from resampling a given set of particles, given their logarithmic weights, and a resampling method.  <a href="#ae7468df83aa6ac4c3d616167036fd6d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#aea2fbc82bdf299a199d98692cc234fed">log2linearWeights</a> (const <a class="el" href="namespacemrpt.html#a4a6aab2c98368ca6b554c04f8fe84cfb">vector_double</a> &amp;in_logWeights, <a class="el" href="namespacemrpt.html#a4a6aab2c98368ca6b554c04f8fe84cfb">vector_double</a> &amp;out_linWeights)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">A static method to compute the linear, normalized (the sum the unity) weights from log-weights.  <a href="#aea2fbc82bdf299a199d98692cc234fed"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a06f7be77f50468af6e58c5514b911447">prediction_and_update_pfStandardProposal</a> (const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *action, const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *observation, const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the particle filter prediction/update stages for the algorithm "pfStandardProposal" (if not implemented in heritated class, it will raise a 'non-implemented' exception).  <a href="#a06f7be77f50468af6e58c5514b911447"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6c3422cab2911965e328101bf240414c">prediction_and_update_pfAuxiliaryPFStandard</a> (const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *action, const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *observation, const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFStandard" (if not implemented in heritated class, it will raise a 'non-implemented' exception).  <a href="#a6c3422cab2911965e328101bf240414c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0094d5dd370db9a037c67dde87649911">prediction_and_update_pfOptimalProposal</a> (const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *action, const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *observation, const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the particle filter prediction/update stages for the algorithm "pfOptimalProposal" (if not implemented in heritated class, it will raise a 'non-implemented' exception).  <a href="#a0094d5dd370db9a037c67dde87649911"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#aeeccd563c344607e4cc96272c9817bd8">prediction_and_update_pfAuxiliaryPFOptimal</a> (const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *action, const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *observation, const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFOptimal" (if not implemented in heritated class, it will raise a 'non-implemented' exception).  <a href="#aeeccd563c344607e4cc96272c9817bd8"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_capable_1_1_t_fast_draw_aux_vars.html">TFastDrawAuxVars</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0f9ce972442bcd3324711dd2211ce659">m_fastDrawAuxiliary</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Auxiliary vectors, see <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a02d7ff724a4b73d449a0f5dc28216e63" title="Prepares data structures for calling fastDrawSample method next.">CParticleFilterCapable::prepareFastDrawSample</a> for more information.  <a href="#a0f9ce972442bcd3324711dd2211ce659"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-static-attribs"></a>
Static Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const unsigned&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a992c733db99a1b0c12015c8ee6f99fbf">PARTICLE_FILTER_CAPABLE_FAST_DRAW_BINS</a></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</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_1bayes_1_1_c_particle_filter_capable.html#a3afe8d786cf4c244b4f83e02390459c2">CParticleFilter</a></td></tr>
</table>
<hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="a6a77d17782b7527dd6cdd4e024ac9f1b"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::TParticleProbabilityEvaluator" ref="a6a77d17782b7527dd6cdd4e024ac9f1b" args=")(const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options, const CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef double( * <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6a77d17782b7527dd6cdd4e024ac9f1b">mrpt::bayes::CParticleFilterCapable::TParticleProbabilityEvaluator</a>)(const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;PF_options, const <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html">CParticleFilterCapable</a> *obj, size_t index, const void *action, const void *observation)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A callback function type for evaluating the probability of m_particles of being selected, used in "fastDrawSample". </p>
<p>The default evaluator function "defaultEvaluator" simply returns the particle weight. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">index</td><td>This is the index of the particle its probability is being computed. </td></tr>
    <tr><td class="paramname">action</td><td>The value of this is the parameter passed to "prepareFastDrawSample" </td></tr>
    <tr><td class="paramname">observation</td><td>The value of this is the parameter passed to "prepareFastDrawSample" The action and the observation are declared as "void*" for a greater flexibility. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a02d7ff724a4b73d449a0f5dc28216e63" title="Prepares data structures for calling fastDrawSample method next.">prepareFastDrawSample</a> </dd></dl>

<p>Definition at line <a class="el" href="_c_particle_filter_capable_8h_source.html#l00073">73</a> of file <a class="el" href="_c_particle_filter_capable_8h_source.html">CParticleFilterCapable.h</a>.</p>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a962214fbf62e0ced82450f032c3b65d9"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::CParticleFilterCapable" ref="a962214fbf62e0ced82450f032c3b65d9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">mrpt::bayes::CParticleFilterCapable::CParticleFilterCapable </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_particle_filter_capable_8h_source.html#l00055">55</a> of file <a class="el" href="_c_particle_filter_capable_8h_source.html">CParticleFilterCapable.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7a75d65311441163eba4dacc2a596174"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::~CParticleFilterCapable" ref="a7a75d65311441163eba4dacc2a596174" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual mrpt::bayes::CParticleFilterCapable::~CParticleFilterCapable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Virtual destructor. </p>

<p>Definition at line <a class="el" href="_c_particle_filter_capable_8h_source.html#l00061">61</a> of file <a class="el" href="_c_particle_filter_capable_8h_source.html">CParticleFilterCapable.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae7468df83aa6ac4c3d616167036fd6d0"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::computeResampling" ref="ae7468df83aa6ac4c3d616167036fd6d0" args="(CParticleFilter::TParticleResamplingAlgorithm method, const vector_double &amp;in_logWeights, std::vector&lt; size_t &gt; &amp;out_indexes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void mrpt::bayes::CParticleFilterCapable::computeResampling </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter.html#a5a2e5c42fba6719b5f2f4b8fa1f4154c">CParticleFilter::TParticleResamplingAlgorithm</a>&#160;</td>
          <td class="paramname"><em>method</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacemrpt.html#a4a6aab2c98368ca6b554c04f8fe84cfb">vector_double</a> &amp;&#160;</td>
          <td class="paramname"><em>in_logWeights</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classstd_1_1vector.html">std::vector</a>&lt; size_t &gt; &amp;&#160;</td>
          <td class="paramname"><em>out_indexes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A static method to perform the computation of the samples resulting from resampling a given set of particles, given their logarithmic weights, and a resampling method. </p>
<p>It returns the sequence of indexes from the resampling. The number of output samples is the same than the input population. This generic method just computes these indexes, to actually perform a resampling in a particle filter object, call performResampling </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a72a3c11af8ca4b021ced0568d952c664" title="Performs a resample of the m_particles, using the method selected in the constructor.">performResampling</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aca935576d796515781dfd8456f4c3025"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::defaultEvaluator" ref="aca935576d796515781dfd8456f4c3025" args="(const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options, const CParticleFilterCapable *obj, size_t index, const void *action, const void *observation)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static double mrpt::bayes::CParticleFilterCapable::defaultEvaluator </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html">CParticleFilterCapable</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>observation</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The default evaluator function, which simply returns the particle weight. </p>
<p>The action and the observation are declared as "void*" for a greater flexibility. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a02d7ff724a4b73d449a0f5dc28216e63" title="Prepares data structures for calling fastDrawSample method next.">prepareFastDrawSample</a> </dd></dl>

<p>Definition at line <a class="el" href="_c_particle_filter_capable_8h_source.html#l00084">84</a> of file <a class="el" href="_c_particle_filter_capable_8h_source.html">CParticleFilterCapable.h</a>.</p>

<p>References <a class="el" href="mrpt__macros_8h_source.html#l00311">MRPT_UNUSED_PARAM</a>, and <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6ca16ca0217cdac4b586df5df9cdaea2">getW()</a>.</p>

</div>
</div>
<a class="anchor" id="afc87a617ea5582e4ba80bb3c065c4785"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::ESS" ref="afc87a617ea5582e4ba80bb3c065c4785" args="()=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual double mrpt::bayes::CParticleFilterCapable::ESS </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the normalized ESS (Estimated Sample Size), in the range [0,1]. </p>
<p>Note that you do NOT need to normalize the weights before calling this. </p>

</div>
</div>
<a class="anchor" id="afc4f93d0568e52e91227348baf7b242f"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::fastDrawSample" ref="afc4f93d0568e52e91227348baf7b242f" args="(const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t mrpt::bayes::CParticleFilterCapable::fastDrawSample </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Draws a random sample from the particle filter, in such a way that each particle has a probability proportional to its weight (in the standard PF algorithm). </p>
<p>This method can be used to generate a variable number of m_particles when resampling: to vary the number of m_particles in the filter. See prepareFastDrawSample for more information, or the <a href="http://www.mrpt.org/Particle_Filters">Particle Filter tutorial</a>.</p>
<p>NOTES:</p>
<ul>
<li>You MUST call "prepareFastDrawSample" ONCE before calling this method. That method must be called after modifying the particle filter (executing one step, resampling, etc...)</li>
<li>This method returns ONE index for the selected ("drawn") particle, in the range [0,M-1]</li>
<li>You do not need to call "normalizeWeights" before calling this. <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a02d7ff724a4b73d449a0f5dc28216e63" title="Prepares data structures for calling fastDrawSample method next.">prepareFastDrawSample</a> </dd></dl>
</li>
</ul>

</div>
</div>
<a class="anchor" id="a6ca16ca0217cdac4b586df5df9cdaea2"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::getW" ref="a6ca16ca0217cdac4b586df5df9cdaea2" args="(size_t i) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual double mrpt::bayes::CParticleFilterCapable::getW </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Access to i'th particle (logarithm) weight, where first one is index 0. </p>

<p>Referenced by <a class="el" href="_c_particle_filter_capable_8h_source.html#l00084">defaultEvaluator()</a>.</p>

</div>
</div>
<a class="anchor" id="aea2fbc82bdf299a199d98692cc234fed"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::log2linearWeights" ref="aea2fbc82bdf299a199d98692cc234fed" args="(const vector_double &amp;in_logWeights, vector_double &amp;out_linWeights)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void mrpt::bayes::CParticleFilterCapable::log2linearWeights </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacemrpt.html#a4a6aab2c98368ca6b554c04f8fe84cfb">vector_double</a> &amp;&#160;</td>
          <td class="paramname"><em>in_logWeights</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacemrpt.html#a4a6aab2c98368ca6b554c04f8fe84cfb">vector_double</a> &amp;&#160;</td>
          <td class="paramname"><em>out_linWeights</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A static method to compute the linear, normalized (the sum the unity) weights from log-weights. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a72a3c11af8ca4b021ced0568d952c664" title="Performs a resample of the m_particles, using the method selected in the constructor.">performResampling</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a675b747939b1945bd16d6cee3f968c14"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::normalizeWeights" ref="a675b747939b1945bd16d6cee3f968c14" args="(double *out_max_log_w=NULL)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual double mrpt::bayes::CParticleFilterCapable::normalizeWeights </td>
          <td>(</td>
          <td class="paramtype">double *&#160;</td>
          <td class="paramname"><em>out_max_log_w</em> = <code>NULL</code></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Normalize the (logarithmic) weights, such as the maximum weight is zero. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">out_max_log_w</td><td>If provided, will return with the maximum log_w before normalizing, such as new_weights = old_weights - max_log_w. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The max/min ratio of weights ("dynamic range") </dd></dl>

</div>
</div>
<a class="anchor" id="a70664baf3816bce82f06933270a5c8d1"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::particlesCount" ref="a70664baf3816bce82f06933270a5c8d1" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual size_t mrpt::bayes::CParticleFilterCapable::particlesCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the m_particles count. </p>

</div>
</div>
<a class="anchor" id="a72a3c11af8ca4b021ced0568d952c664"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::performResampling" ref="a72a3c11af8ca4b021ced0568d952c664" args="(const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::bayes::CParticleFilterCapable::performResampling </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs a resample of the m_particles, using the method selected in the constructor. </p>
<p>After computing the surviving samples, this method internally calls "performSubstitution" to actually perform the particle replacement. This method is called automatically by CParticleFilter::execute, andshould not be invoked manually normally. To just obtaining the sequence of resampled indexes from a sequence of weights, use "resample" </p>
<dl class="see"><dt><b>See also:</b></dt><dd>resample </dd></dl>

</div>
</div>
<a class="anchor" id="a9f8e1f63a625dedcc5e5209dde04203f"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::performSubstitution" ref="a9f8e1f63a625dedcc5e5209dde04203f" args="(const std::vector&lt; size_t &gt; &amp;indx)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mrpt::bayes::CParticleFilterCapable::performSubstitution </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classstd_1_1vector.html">std::vector</a>&lt; size_t &gt; &amp;&#160;</td>
          <td class="paramname"><em>indx</em></td><td>)</td>
          <td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs the substitution for internal use of resample in particle filter algorithm, don't call it directly. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">indx</td><td>The indices of current m_particles to be saved as the new m_particles set. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0b464ec72adbfc8a9aea3cf4aa6bdf9e"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::prediction_and_update" ref="a0b464ec72adbfc8a9aea3cf4aa6bdf9e" args="(const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::bayes::CParticleFilterCapable::prediction_and_update </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *&#160;</td>
          <td class="paramname"><em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *&#160;</td>
          <td class="paramname"><em>observation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs the prediction stage of the Particle Filter. </p>
<p>This method simply selects the appropiate protected method according to the particle filter algorithm to run. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a06f7be77f50468af6e58c5514b911447" title="Performs the particle filter prediction/update stages for the algorithm &quot;pfStandardProposal&quot; (if no...">prediction_and_update_pfStandardProposal</a>,<a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6c3422cab2911965e328101bf240414c" title="Performs the particle filter prediction/update stages for the algorithm &quot;pfAuxiliaryPFStandard&quot; (if...">prediction_and_update_pfAuxiliaryPFStandard</a>,<a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0094d5dd370db9a037c67dde87649911" title="Performs the particle filter prediction/update stages for the algorithm &quot;pfOptimalProposal&quot; (if not...">prediction_and_update_pfOptimalProposal</a>,<a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#aeeccd563c344607e4cc96272c9817bd8" title="Performs the particle filter prediction/update stages for the algorithm &quot;pfAuxiliaryPFOptimal&quot; (if ...">prediction_and_update_pfAuxiliaryPFOptimal</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aeeccd563c344607e4cc96272c9817bd8"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfAuxiliaryPFOptimal" ref="aeeccd563c344607e4cc96272c9817bd8" args="(const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfAuxiliaryPFOptimal </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *&#160;</td>
          <td class="paramname"><em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *&#160;</td>
          <td class="paramname"><em>observation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFOptimal" (if not implemented in heritated class, it will raise a 'non-implemented' exception). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0b464ec72adbfc8a9aea3cf4aa6bdf9e" title="Performs the prediction stage of the Particle Filter.">prediction_and_update</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html#a78b180315cc2053366ffc323d70c47d3">mrpt::hmtslam::CLocalMetricHypothesis</a>, <a class="el" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization2_d.html#a6315a50c4e8384d6aa5416231072d27c">mrpt::slam::CMonteCarloLocalization2D</a>, <a class="el" href="classmrpt_1_1slam_1_1_c_multi_metric_map_p_d_f.html#a51d0abaabb4271a42104d52611efdb3a">mrpt::slam::CMultiMetricMapPDF</a>, and <a class="el" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization3_d.html#a4453d4d38f11025d5e59bd745cac36de">mrpt::slam::CMonteCarloLocalization3D</a>.</p>

</div>
</div>
<a class="anchor" id="a6c3422cab2911965e328101bf240414c"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfAuxiliaryPFStandard" ref="a6c3422cab2911965e328101bf240414c" args="(const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfAuxiliaryPFStandard </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *&#160;</td>
          <td class="paramname"><em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *&#160;</td>
          <td class="paramname"><em>observation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs the particle filter prediction/update stages for the algorithm "pfAuxiliaryPFStandard" (if not implemented in heritated class, it will raise a 'non-implemented' exception). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0b464ec72adbfc8a9aea3cf4aa6bdf9e" title="Performs the prediction stage of the Particle Filter.">prediction_and_update</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization2_d.html#a3074ce8f8ecf530f127d62924c04a375">mrpt::slam::CMonteCarloLocalization2D</a>, and <a class="el" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization3_d.html#a760564d6b69f6657885554965242e124">mrpt::slam::CMonteCarloLocalization3D</a>.</p>

</div>
</div>
<a class="anchor" id="a0094d5dd370db9a037c67dde87649911"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfOptimalProposal" ref="a0094d5dd370db9a037c67dde87649911" args="(const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfOptimalProposal </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *&#160;</td>
          <td class="paramname"><em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *&#160;</td>
          <td class="paramname"><em>observation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs the particle filter prediction/update stages for the algorithm "pfOptimalProposal" (if not implemented in heritated class, it will raise a 'non-implemented' exception). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0b464ec72adbfc8a9aea3cf4aa6bdf9e" title="Performs the prediction stage of the Particle Filter.">prediction_and_update</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classmrpt_1_1hmtslam_1_1_c_local_metric_hypothesis.html#a0ff4807b7f76022508be551a47fdfb4a">mrpt::hmtslam::CLocalMetricHypothesis</a>, and <a class="el" href="classmrpt_1_1slam_1_1_c_multi_metric_map_p_d_f.html#ad4b68096ef09fab2fddac545f2f5cb1a">mrpt::slam::CMultiMetricMapPDF</a>.</p>

</div>
</div>
<a class="anchor" id="a06f7be77f50468af6e58c5514b911447"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfStandardProposal" ref="a06f7be77f50468af6e58c5514b911447" args="(const mrpt::slam::CActionCollection *action, const mrpt::slam::CSensoryFrame *observation, const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mrpt::bayes::CParticleFilterCapable::prediction_and_update_pfStandardProposal </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_action_collection.html">mrpt::slam::CActionCollection</a> *&#160;</td>
          <td class="paramname"><em>action</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classmrpt_1_1slam_1_1_c_sensory_frame.html">mrpt::slam::CSensoryFrame</a> *&#160;</td>
          <td class="paramname"><em>observation</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs the particle filter prediction/update stages for the algorithm "pfStandardProposal" (if not implemented in heritated class, it will raise a 'non-implemented' exception). </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0b464ec72adbfc8a9aea3cf4aa6bdf9e" title="Performs the prediction stage of the Particle Filter.">prediction_and_update</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization2_d.html#afb789df37583e3e6fbc28246a38a5ccd">mrpt::slam::CMonteCarloLocalization2D</a>, <a class="el" href="classmrpt_1_1slam_1_1_c_multi_metric_map_p_d_f.html#a5d0030387ffaf9ec50a17be06e477fb9">mrpt::slam::CMultiMetricMapPDF</a>, and <a class="el" href="classmrpt_1_1slam_1_1_c_monte_carlo_localization3_d.html#aecc3c96a277c773685141a464f799330">mrpt::slam::CMonteCarloLocalization3D</a>.</p>

</div>
</div>
<a class="anchor" id="a02d7ff724a4b73d449a0f5dc28216e63"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::prepareFastDrawSample" ref="a02d7ff724a4b73d449a0f5dc28216e63" args="(const bayes::CParticleFilter::TParticleFilterOptions &amp;PF_options, TParticleProbabilityEvaluator partEvaluator=defaultEvaluator, const void *action=NULL, const void *observation=NULL) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void mrpt::bayes::CParticleFilterCapable::prepareFastDrawSample </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html">bayes::CParticleFilter::TParticleFilterOptions</a> &amp;&#160;</td>
          <td class="paramname"><em>PF_options</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a6a77d17782b7527dd6cdd4e024ac9f1b">TParticleProbabilityEvaluator</a>&#160;</td>
          <td class="paramname"><em>partEvaluator</em> = <code>defaultEvaluator</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>action</em> = <code>NULL</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>observation</em> = <code>NULL</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Prepares data structures for calling fastDrawSample method next. </p>
<p>This method must be called once before using "fastDrawSample" (calling this more than once has no effect, but it takes time for nothing!) The behavior depends on the configuration of the PF (see <a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_1_1_t_particle_filter_options.html" title="The configuration of a particle filter.">CParticleFilter::TParticleFilterOptions</a>):</p>
<ul>
<li><b>DYNAMIC SAMPLE SIZE=NO</b>: In this case this method fills out an internal array (m_fastDrawAuxiliary.alreadyDrawnIndexes) with the random indexes generated according to the selected resample scheme in TParticleFilterOptions. Those indexes are read sequentially by subsequent calls to fastDrawSample.</li>
<li><b>DYNAMIC SAMPLE SIZE=YES</b>: Then:<ul>
<li>If TParticleFilterOptions.resamplingMethod = prMultinomial, the internal buffers will be filled out (m_fastDrawAuxiliary.CDF, CDF_indexes &amp; PDF) and then fastDrawSample can be called an arbitrary number of times to generate random indexes.</li>
<li>For the rest of resampling algorithms, an exception will be raised since they are not appropriate for a dynamic (unknown in advance) number of particles.</li>
</ul>
</li>
</ul>
<p>The function pointed by "partEvaluator" should take into account the particle filter algorithm selected in "m_PFAlgorithm". If called without arguments (defaultEvaluator), the default behavior is to draw samples with a probability proportional to their current weights. The action and the observation are declared as "void*" for a greater flexibility. For a more detailed information see the <a href="http://www.mrpt.org/Particle_Filters">Particle Filter tutorial</a>. Custom supplied "partEvaluator" functions must take into account the previous particle weight, i.e. multiplying the current observation likelihood by the weights. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#afc4f93d0568e52e91227348baf7b242f" title="Draws a random sample from the particle filter, in such a way that each particle has a probability pr...">fastDrawSample</a> </dd></dl>

<p>Referenced by <a class="el" href="_p_f__implementations_8h_source.html#l00518">mrpt::slam::PF_implementation::PF_SLAM_implementation_pfAuxiliaryPFStandardAndOptimal()</a>.</p>

</div>
</div>
<a class="anchor" id="aecb3d0c17d29b4027a7eede17d2e0b8e"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::setW" ref="aecb3d0c17d29b4027a7eede17d2e0b8e" args="(size_t i, double w)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void mrpt::bayes::CParticleFilterCapable::setW </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>w</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Modifies i'th particle (logarithm) weight, where first one is index 0. </p>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a3afe8d786cf4c244b4f83e02390459c2"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::CParticleFilter" ref="a3afe8d786cf4c244b4f83e02390459c2" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter.html">CParticleFilter</a><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_particle_filter_capable_8h_source.html#l00048">48</a> of file <a class="el" href="_c_particle_filter_capable_8h_source.html">CParticleFilterCapable.h</a>.</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a0f9ce972442bcd3324711dd2211ce659"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::m_fastDrawAuxiliary" ref="a0f9ce972442bcd3324711dd2211ce659" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structmrpt_1_1bayes_1_1_c_particle_filter_capable_1_1_t_fast_draw_aux_vars.html">TFastDrawAuxVars</a> <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a0f9ce972442bcd3324711dd2211ce659">mrpt::bayes::CParticleFilterCapable::m_fastDrawAuxiliary</a><code> [mutable, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Auxiliary vectors, see <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a02d7ff724a4b73d449a0f5dc28216e63" title="Prepares data structures for calling fastDrawSample method next.">CParticleFilterCapable::prepareFastDrawSample</a> for more information. </p>

<p>Definition at line <a class="el" href="_c_particle_filter_capable_8h_source.html#l00249">249</a> of file <a class="el" href="_c_particle_filter_capable_8h_source.html">CParticleFilterCapable.h</a>.</p>

</div>
</div>
<a class="anchor" id="a992c733db99a1b0c12015c8ee6f99fbf"></a><!-- doxytag: member="mrpt::bayes::CParticleFilterCapable::PARTICLE_FILTER_CAPABLE_FAST_DRAW_BINS" ref="a992c733db99a1b0c12015c8ee6f99fbf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const unsigned <a class="el" href="classmrpt_1_1bayes_1_1_c_particle_filter_capable.html#a992c733db99a1b0c12015c8ee6f99fbf">mrpt::bayes::CParticleFilterCapable::PARTICLE_FILTER_CAPABLE_FAST_DRAW_BINS</a><code> [static, private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_c_particle_filter_capable_8h_source.html#l00051">51</a> of file <a class="el" href="_c_particle_filter_capable_8h_source.html">CParticleFilterCapable.h</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>