[8] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
---|
| 2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
---|
| 3 | <title>mixpp: work/mixpp/libPF.h Source File</title> |
---|
| 4 | <link href="doxygen.css" rel="stylesheet" type="text/css"> |
---|
| 5 | <link href="tabs.css" rel="stylesheet" type="text/css"> |
---|
| 6 | </head><body> |
---|
| 7 | <!-- Generated by Doxygen 1.5.3 --> |
---|
| 8 | <div class="tabs"> |
---|
| 9 | <ul> |
---|
| 10 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
| 11 | <li><a href="annotated.html"><span>Classes</span></a></li> |
---|
| 12 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
| 13 | </ul> |
---|
| 14 | </div> |
---|
| 15 | <h1>work/mixpp/libPF.h</h1><a href="libPF_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
| 16 | <a name="l00013"></a>00013 <span class="preprocessor">#ifndef PF_H</span> |
---|
| 17 | <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define PF_H</span> |
---|
| 18 | <a name="l00015"></a>00015 <span class="preprocessor"></span> |
---|
| 19 | <a name="l00016"></a>00016 <span class="preprocessor">#include <itpp/itbase.h></span> |
---|
| 20 | <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="libBM_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations.">libBM.h</a>"</span> |
---|
| 21 | <a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="libDC_8h.html" title="Matrices in decomposed forms (LDL&#39;, LU, UDU&#39;, etc).">libDC.h</a>"</span> |
---|
| 22 | <a name="l00019"></a>00019 |
---|
| 23 | <a name="l00020"></a>00020 <span class="keyword">using namespace </span>itpp; |
---|
| 24 | <a name="l00021"></a>00021 |
---|
| 25 | <a name="l00022"></a>00022 <span class="keyword">enum</span> RESAMPLING_METHOD { MULTINOMIAL = 0, DETERMINISTIC = 1, RESIDUAL = 2, SYSTEMATIC = 3 }; |
---|
| 26 | <a name="l00023"></a>00023 |
---|
| 27 | <a name="l00029"></a><a class="code" href="classPF.html">00029</a> <span class="keyword">class </span><a class="code" href="classPF.html" title="A Particle Filter prototype.">PF</a> : <span class="keyword">public</span> <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { |
---|
| 28 | <a name="l00030"></a>00030 <span class="keyword">protected</span>: |
---|
| 29 | <a name="l00031"></a>00031 <span class="keywordtype">int</span> n; <span class="comment">//number of particles</span> |
---|
| 30 | <a name="l00032"></a>00032 vec w; <span class="comment">//particle weights</span> |
---|
| 31 | <a name="l00033"></a>00033 |
---|
| 32 | <a name="l00034"></a>00034 <span class="keyword">public</span>: |
---|
| 33 | <a name="l00036"></a>00036 ivec <a class="code" href="classPF.html#a0e26b2f6a5884aca49122f3e4f0cf19" title="Returns indexes of particles that should be resampled.">resample</a>(RESAMPLING_METHOD method = SYSTEMATIC); |
---|
| 34 | <a name="l00037"></a>00037 <span class="comment">//TODO get them on the web</span> |
---|
| 35 | <a name="l00038"></a>00038 }; |
---|
| 36 | <a name="l00039"></a>00039 |
---|
| 37 | <a name="l00046"></a><a class="code" href="classTrivialPF.html">00046</a> <span class="keyword">class </span><a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a> : <span class="keyword">public</span> <a class="code" href="classPF.html" title="A Particle Filter prototype.">PF</a> { |
---|
| 38 | <a name="l00047"></a>00047 Array<vec> ptcls; |
---|
| 39 | <a name="l00048"></a>00048 |
---|
| 40 | <a name="l00049"></a>00049 <span class="keywordtype">bool</span> is_proposal; |
---|
| 41 | <a name="l00050"></a>00050 <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *prop; |
---|
| 42 | <a name="l00051"></a>00051 <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *par; |
---|
| 43 | <a name="l00052"></a>00052 <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *obs; |
---|
| 44 | <a name="l00053"></a>00053 |
---|
| 45 | <a name="l00054"></a>00054 <span class="keyword">public</span>: |
---|
| 46 | <a name="l00055"></a>00055 <a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a>(<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &prop, <span class="keywordtype">int</span> n0); |
---|
| 47 | <a name="l00056"></a>00056 <a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a>(<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs, <span class="keywordtype">int</span> n0); |
---|
| 48 | <a name="l00057"></a>00057 <span class="keywordtype">void</span> <a class="code" href="classTrivialPF.html#77a92bf054d763f806d27fc37a058389" title="Incremental Bayes rule.">bayes</a>(<span class="keyword">const</span> vec &dt, <span class="keywordtype">bool</span> evalll); |
---|
| 49 | <a name="l00058"></a>00058 }; |
---|
| 50 | <a name="l00059"></a>00059 |
---|
| 51 | <a name="l00060"></a>00060 <span class="keyword">class </span>MPF : <span class="keyword">public</span> <a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a> { |
---|
| 52 | <a name="l00061"></a>00061 Array<BM> Bms; |
---|
| 53 | <a name="l00062"></a>00062 <span class="keyword">public</span>: |
---|
| 54 | <a name="l00063"></a>00063 MPF(<a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> &B, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &prop, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par); |
---|
| 55 | <a name="l00064"></a>00064 <span class="keywordtype">void</span> <a class="code" href="classTrivialPF.html#77a92bf054d763f806d27fc37a058389" title="Incremental Bayes rule.">bayes</a>(vec &dt); |
---|
| 56 | <a name="l00065"></a>00065 }; |
---|
| 57 | <a name="l00066"></a>00066 |
---|
| 58 | <a name="l00067"></a>00067 <span class="preprocessor">#endif // KF_H</span> |
---|
| 59 | <a name="l00068"></a>00068 <span class="preprocessor"></span> |
---|
| 60 | <a name="l00069"></a>00069 |
---|
| 61 | </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Wed Jan 23 11:30:10 2008 for mixpp by |
---|
| 62 | <a href="http://www.doxygen.org/index.html"> |
---|
| 63 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> |
---|
| 64 | </body> |
---|
| 65 | </html> |
---|