Show
Ignore:
Timestamp:
02/16/08 15:12:24 (17 years ago)
Author:
smidl
Message:

Switch to CMake

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • doc/html/libPF_8h-source.html

    r8 r19  
    11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
    22<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> 
    3 <title>mixpp: work/mixpp/libPF.h Source File</title> 
     3<title>mixpp: work/mixpp/bdm/estim/libPF.h Source File</title> 
    44<link href="doxygen.css" rel="stylesheet" type="text/css"> 
    55<link href="tabs.css" rel="stylesheet" type="text/css"> 
     
    1313  </ul> 
    1414</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  
     15<h1>work/mixpp/bdm/estim/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  
    1616<a name="l00013"></a>00013 <span class="preprocessor">#ifndef PF_H</span> 
    1717<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define PF_H</span> 
    1818<a name="l00015"></a>00015 <span class="preprocessor"></span> 
    1919<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;itpp/itbase.h&gt;</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&amp;#39;, LU, UDU&amp;#39;, etc).">libDC.h</a>"</span> 
     20<a name="l00017"></a>00017 <span class="preprocessor">#include "../stat/libBM.h"</span> 
     21<a name="l00018"></a>00018 <span class="preprocessor">#include "../math/libDC.h"</span> 
    2222<a name="l00019"></a>00019  
    2323<a name="l00020"></a>00020 <span class="keyword">using namespace </span>itpp; 
    2424<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 }; 
     25<a name="l00022"></a>00022 <span class="keyword">enum</span> RESAMPLING_METHOD { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 }; 
    2626<a name="l00023"></a>00023  
    2727<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> {  
     
    2929<a name="l00031"></a>00031         <span class="keywordtype">int</span> n; <span class="comment">//number of particles</span> 
    3030<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&lt;vec&gt; 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> &amp;par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;obs, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;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> &amp;par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;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 &amp;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&lt;BM&gt; 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> &amp;B, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;prop, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;obs, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;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 &amp;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> 
     31<a name="l00033"></a>00033         Uniform_RNG URNG; <span class="comment">//used for resampling</span> 
     32<a name="l00034"></a>00034          
     33<a name="l00035"></a>00035 <span class="keyword">public</span>: 
     34<a name="l00037"></a>00037         ivec <a class="code" href="classPF.html#a0e26b2f6a5884aca49122f3e4f0cf19" title="Returns indexes of particles that should be resampled. The ordering MUST guarantee...">resample</a>(RESAMPLING_METHOD method = SYSTEMATIC); 
     35<a name="l00038"></a>00038         <a class="code" href="classPF.html" title="A Particle Filter prototype.">PF</a> (vec w); 
     36<a name="l00039"></a>00039         <span class="comment">//TODO remove or implement bayes()!</span> 
     37<a name="l00040"></a><a class="code" href="classPF.html#eb06bd7d4325f22f54233967295793b9">00040</a>         <span class="keywordtype">void</span> <a class="code" href="classPF.html#eb06bd7d4325f22f54233967295793b9" title="Incremental Bayes rule.">bayes</a>(<span class="keyword">const</span> vec &amp;dt, <span class="keywordtype">bool</span> evell){}; 
     38<a name="l00041"></a>00041 }; 
     39<a name="l00042"></a>00042  
     40<a name="l00049"></a><a class="code" href="classTrivialPF.html">00049</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> { 
     41<a name="l00050"></a>00050         Array&lt;vec&gt; ptcls; 
     42<a name="l00051"></a>00051          
     43<a name="l00052"></a>00052         <span class="keywordtype">bool</span> is_proposal; 
     44<a name="l00053"></a>00053         <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *prop; 
     45<a name="l00054"></a>00054         <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *par; 
     46<a name="l00055"></a>00055         <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *obs; 
     47<a name="l00056"></a>00056          
     48<a name="l00057"></a>00057         <span class="keyword">public</span>: 
     49<a name="l00058"></a>00058         <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> &amp;par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;obs, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;prop, <span class="keywordtype">int</span> n0); 
     50<a name="l00059"></a>00059         <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> &amp;par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;obs, <span class="keywordtype">int</span> n0); 
     51<a name="l00060"></a>00060         <span class="keywordtype">void</span> <a class="code" href="classTrivialPF.html#77a92bf054d763f806d27fc37a058389" title="Incremental Bayes rule.">bayes</a>(<span class="keyword">const</span> vec &amp;dt, <span class="keywordtype">bool</span> evalll); 
     52<a name="l00061"></a>00061 }; 
     53<a name="l00062"></a>00062  
     54<a name="l00063"></a>00063 <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> { 
     55<a name="l00064"></a>00064         Array&lt;BM&gt; Bms; 
     56<a name="l00065"></a>00065         <span class="keyword">public</span>: 
     57<a name="l00066"></a>00066         MPF(<a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> &amp;B, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;prop, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;obs, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &amp;par); 
     58<a name="l00067"></a>00067         <span class="keywordtype">void</span> <a class="code" href="classTrivialPF.html#77a92bf054d763f806d27fc37a058389" title="Incremental Bayes rule.">bayes</a>(vec &amp;dt);     
     59<a name="l00068"></a>00068 }; 
    6060<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&nbsp; 
     61<a name="l00070"></a>00070 <span class="preprocessor">#endif // KF_H</span> 
     62<a name="l00071"></a>00071 <span class="preprocessor"></span> 
     63<a name="l00072"></a>00072  
     64</pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 15 18:57:36 2008 for mixpp by&nbsp; 
    6265<a href="http://www.doxygen.org/index.html"> 
    6366<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>