25 | | <a name="l00026"></a><a class="code" href="classRV.html">00026</a> <span class="keyword">class </span><a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> { |
26 | | <a name="l00028"></a>00028 <span class="keywordtype">int</span> size; |
27 | | <a name="l00030"></a>00030 <span class="keywordtype">int</span> len; |
28 | | <a name="l00031"></a>00031 ivec ids; |
29 | | <a name="l00032"></a>00032 ivec sizes; |
30 | | <a name="l00033"></a>00033 ivec times; |
31 | | <a name="l00034"></a>00034 ivec obs; |
32 | | <a name="l00035"></a>00035 Array<std::string> names; |
33 | | <a name="l00036"></a>00036 |
34 | | <a name="l00037"></a>00037 <span class="keyword">private</span>: |
35 | | <a name="l00038"></a>00038 <span class="keywordtype">void</span> init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); |
36 | | <a name="l00039"></a>00039 <span class="keyword">public</span>: |
37 | | <a name="l00041"></a>00041 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); |
38 | | <a name="l00043"></a>00043 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec ids ); |
39 | | <a name="l00045"></a>00045 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> (); |
40 | | <a name="l00046"></a>00046 |
41 | | <a name="l00048"></a>00048 <span class="keyword">friend</span> std::ostream &<a class="code" href="classRV.html#cad6f15535d10437f6690cb4492176a8" title="Printing output e.g. for debugging.">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ); |
42 | | <a name="l00049"></a>00049 |
43 | | <a name="l00051"></a><a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0">00051</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> size;} ; |
44 | | <a name="l00052"></a>00052 <span class="comment">//TODO why not inline and later??</span> |
45 | | <a name="l00053"></a>00053 |
46 | | <a name="l00055"></a>00055 ivec <a class="code" href="classRV.html#6b078b1086224aca3a9e5a203e647fb6" title="Find indexes of another rv in self.">find</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2); |
47 | | <a name="l00057"></a>00057 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <span class="keyword">add</span>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2); |
48 | | <a name="l00059"></a>00059 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#4c5ec5e913fc598e242cb930ae8bdf4a" title="Subtract another variable from the current one.">subt</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2); |
49 | | <a name="l00061"></a>00061 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#2bf35b18a32aad419f0516273939628e" title="Select only variables at indeces ind.">subselect</a>(ivec ind); |
50 | | <a name="l00063"></a>00063 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45" title="Select only variables at indeces ind.">operator()</a>(ivec ind); |
51 | | <a name="l00065"></a>00065 <span class="keywordtype">void</span> <a class="code" href="classRV.html#e0a158d53ab9430627241f844f4c9a60" title="Generate new RV with time shifted by delta.">t</a>(<span class="keywordtype">int</span> delta); |
52 | | <a name="l00067"></a>00067 ivec <a class="code" href="classRV.html#8470cf53be6e7bdba78ad0efbd203ee7" title="generate a list of indeces, i.e. which">indexlist</a>(); |
53 | | <a name="l00068"></a>00068 }; |
54 | | <a name="l00069"></a>00069 |
55 | | <a name="l00070"></a>00070 |
56 | | <a name="l00071"></a>00071 |
| 25 | <a name="l00027"></a><a class="code" href="classRV.html">00027</a> <span class="keyword">class </span><a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> { |
| 26 | <a name="l00028"></a>00028 <span class="keyword">protected</span>: |
| 27 | <a name="l00030"></a><a class="code" href="classRV.html#0cae53d262be90a775a99a198e17fa58">00030</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#0cae53d262be90a775a99a198e17fa58" title="size = sum of sizes">size</a>; |
| 28 | <a name="l00032"></a><a class="code" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9">00032</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9" title="len = number of individual rvs">len</a>; |
| 29 | <a name="l00033"></a>00033 ivec ids; |
| 30 | <a name="l00034"></a>00034 ivec sizes; |
| 31 | <a name="l00035"></a>00035 ivec times; |
| 32 | <a name="l00036"></a>00036 ivec obs; |
| 33 | <a name="l00037"></a>00037 Array<std::string> names; |
| 34 | <a name="l00038"></a>00038 |
| 35 | <a name="l00039"></a>00039 <span class="keyword">private</span>: |
| 36 | <a name="l00040"></a>00040 <span class="keywordtype">void</span> init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); |
| 37 | <a name="l00041"></a>00041 <span class="keyword">public</span>: |
| 38 | <a name="l00043"></a>00043 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); |
| 39 | <a name="l00045"></a>00045 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec ids ); |
| 40 | <a name="l00047"></a>00047 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> (); |
| 41 | <a name="l00048"></a>00048 |
| 42 | <a name="l00050"></a>00050 <span class="keyword">friend</span> std::ostream &<a class="code" href="classRV.html#cad6f15535d10437f6690cb4492176a8" title="Printing output e.g. for debugging.">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ); |
| 43 | <a name="l00051"></a>00051 |
| 44 | <a name="l00053"></a><a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0">00053</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classRV.html#0cae53d262be90a775a99a198e17fa58" title="size = sum of sizes">size</a>;} ; |
| 45 | <a name="l00054"></a>00054 |
| 46 | <a name="l00055"></a>00055 <span class="comment">//TODO why not inline and later??</span> |
| 47 | <a name="l00056"></a>00056 |
| 48 | <a name="l00058"></a>00058 ivec <a class="code" href="classRV.html#6b078b1086224aca3a9e5a203e647fb6" title="Find indexes of another rv in self.">find</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2 ); |
| 49 | <a name="l00060"></a>00060 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <span class="keyword">add</span> (<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv2 ); |
| 50 | <a name="l00062"></a>00062 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#4c5ec5e913fc598e242cb930ae8bdf4a" title="Subtract another variable from the current one.">subt</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2 ); |
| 51 | <a name="l00064"></a>00064 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#2bf35b18a32aad419f0516273939628e" title="Select only variables at indeces ind.">subselect</a> ( ivec ind ); |
| 52 | <a name="l00066"></a>00066 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45" title="Select only variables at indeces ind.">operator() </a>( ivec ind ); |
| 53 | <a name="l00068"></a>00068 <span class="keywordtype">void</span> <a class="code" href="classRV.html#e0a158d53ab9430627241f844f4c9a60" title="Generate new RV with time shifted by delta.">t</a> ( <span class="keywordtype">int</span> delta ); |
| 54 | <a name="l00070"></a>00070 ivec <a class="code" href="classRV.html#8470cf53be6e7bdba78ad0efbd203ee7" title="generate a list of indeces, i.e. which">indexlist</a>(); |
| 55 | <a name="l00071"></a>00071 }; |
71 | | <a name="l00095"></a><a class="code" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae">00095</a> <a class="code" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae" title="Default constructor.">BM</a>():<a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>(0),evall(true){}; |
72 | | <a name="l00096"></a>00096 |
73 | | <a name="l00100"></a>00100 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &dt) = 0; |
74 | | <a name="l00102"></a>00102 <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); |
75 | | <a name="l00104"></a>00104 <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>(); |
76 | | <a name="l00105"></a>00105 }; |
77 | | <a name="l00106"></a>00106 |
78 | | <a name="l00108"></a><a class="code" href="classepdf.html">00108</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { |
79 | | <a name="l00109"></a>00109 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; |
80 | | <a name="l00110"></a>00110 <span class="keyword">public</span>: |
81 | | <a name="l00112"></a>00112 <span class="comment">// virtual vec moment ( const int order = 1 );</span> |
82 | | <a name="l00114"></a>00114 <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa" title="Returns the required moment of the epdf.">sample</a> ()=0; |
83 | | <a name="l00116"></a><a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">00116</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc" title="Compute probability of argument val.">eval</a>(<span class="keyword">const</span> vec &val){}; |
84 | | <a name="l00117"></a>00117 }; |
85 | | <a name="l00118"></a>00118 |
86 | | <a name="l00120"></a><a class="code" href="classmpdf.html">00120</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { |
87 | | <a name="l00122"></a>00122 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; |
88 | | <a name="l00124"></a>00124 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvc; |
89 | | <a name="l00125"></a>00125 <span class="keyword">public</span>: |
90 | | <a name="l00126"></a>00126 |
91 | | <a name="l00128"></a>00128 <span class="comment">// virtual fnc moment ( const int order = 1 );</span> |
92 | | <a name="l00130"></a><a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">00130</a> <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41" title="Returns the required moment of the epdf.">samplecond</a> (vec &cond, <span class="keywordtype">double</span> lik){}; |
93 | | <a name="l00131"></a>00131 <span class="keyword">virtual</span> <span class="keywordtype">void</span> condition (vec &cond){}; |
94 | | <a name="l00132"></a>00132 }; |
95 | | <a name="l00133"></a>00133 |
96 | | <a name="l00140"></a><a class="code" href="classDS.html">00140</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
97 | | <a name="l00141"></a>00141 <span class="keyword">protected</span>: |
98 | | <a name="l00143"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00143</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; |
99 | | <a name="l00145"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00145</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> |
100 | | <a name="l00146"></a>00146 <span class="keyword">public</span>: |
101 | | <a name="l00148"></a>00148 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a>(vec &dt); |
102 | | <a name="l00150"></a>00150 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a>(vec &dt, ivec &indeces); |
103 | | <a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a>(vec &ut); |
104 | | <a name="l00154"></a>00154 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a>(vec &ut, ivec &indeces); |
105 | | <a name="l00160"></a>00160 <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &urv); |
106 | | <a name="l00161"></a>00161 |
107 | | <a name="l00163"></a>00163 <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system...">step</a>(); |
108 | | <a name="l00164"></a>00164 }; |
109 | | <a name="l00165"></a>00165 |
110 | | <a name="l00166"></a>00166 |
111 | | <a name="l00167"></a>00167 <span class="preprocessor">#endif // BM_H</span> |
112 | | </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by |
| 73 | <a name="l00094"></a><a class="code" href="classepdf.html">00094</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { |
| 74 | <a name="l00095"></a>00095 <span class="keyword">protected</span>: |
| 75 | <a name="l00096"></a>00096 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; |
| 76 | <a name="l00097"></a>00097 <span class="keyword">public</span>: |
| 77 | <a name="l00099"></a><a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">00099</a> <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a>() :rv ( ivec ( 0 ) ) {}; |
| 78 | <a name="l00100"></a>00100 |
| 79 | <a name="l00102"></a><a class="code" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">00102</a> <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0 ) :rv ( rv0 ) {}; |
| 80 | <a name="l00103"></a>00103 |
| 81 | <a name="l00105"></a>00105 <span class="comment">// virtual vec moment ( const int order = 1 );</span> |
| 82 | <a name="l00107"></a>00107 <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa" title="Returns the required moment of the epdf.">sample</a> () =0; |
| 83 | <a name="l00109"></a><a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">00109</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &val ) {<span class="keywordflow">return</span> 0.0;}; |
| 84 | <a name="l00110"></a>00110 |
| 85 | <a name="l00112"></a><a class="code" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">00112</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &val ) {<span class="keywordflow">return</span> 0.0;}; |
| 86 | <a name="l00113"></a>00113 |
| 87 | <a name="l00115"></a>00115 <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef" title="return expected value">mean</a>()=0; |
| 88 | <a name="l00116"></a>00116 |
| 89 | <a name="l00118"></a><a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">00118</a> <span class="keyword">virtual</span> <a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396" title="Destructor for future use;.">~epdf</a>() {}; |
| 90 | <a name="l00119"></a>00119 }; |
| 91 | <a name="l00120"></a>00120 |
| 92 | <a name="l00121"></a>00121 |
| 93 | <a name="l00123"></a>00123 <span class="comment">//TODO Samplecond can be generalized</span> |
| 94 | <a name="l00124"></a>00124 |
| 95 | <a name="l00125"></a><a class="code" href="classmpdf.html">00125</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { |
| 96 | <a name="l00126"></a>00126 <span class="keyword">protected</span>: |
| 97 | <a name="l00128"></a><a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">00128</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>; |
| 98 | <a name="l00130"></a><a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">00130</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>; |
| 99 | <a name="l00132"></a><a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">00132</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>; |
| 100 | <a name="l00133"></a>00133 <span class="keyword">public</span>: |
| 101 | <a name="l00134"></a>00134 |
| 102 | <a name="l00136"></a>00136 <span class="comment">// virtual fnc moment ( const int order = 1 );</span> |
| 103 | <a name="l00138"></a><a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">00138</a> <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41" title="Returns the required moment of the epdf.">samplecond</a> ( vec &cond, <span class="keywordtype">double</span> lik ) {<span class="keywordflow">return</span> vec ( 0 );}; |
| 104 | <a name="l00139"></a>00139 |
| 105 | <a name="l00140"></a>00140 <span class="keyword">virtual</span> <span class="keywordtype">void</span> condition ( <span class="keyword">const</span> vec &cond ) {}; |
| 106 | <a name="l00141"></a>00141 |
| 107 | <a name="l00142"></a>00142 <span class="keyword">virtual</span> <span class="keywordtype">double</span> evalcond (<span class="keyword">const</span> vec &dt, <span class="keyword">const</span> vec &cond ) {this->condition(cond);<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc" title="Compute probability of argument val.">eval</a>(dt);}; |
| 108 | <a name="l00143"></a>00143 |
| 109 | <a name="l00145"></a><a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">00145</a> <span class="keyword">virtual</span> <a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb" title="Destructor for future use;.">~mpdf</a>() {}; |
| 110 | <a name="l00146"></a>00146 |
| 111 | <a name="l00148"></a><a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">00148</a> <a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f" title="Default constructor.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc0 ) :<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ( rvc0 ) {}; |
| 112 | <a name="l00149"></a>00149 }; |
| 113 | <a name="l00150"></a>00150 |
| 114 | <a name="l00158"></a><a class="code" href="classDS.html">00158</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
| 115 | <a name="l00159"></a>00159 <span class="keyword">protected</span>: |
| 116 | <a name="l00161"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00161</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; |
| 117 | <a name="l00163"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00163</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> |
| 118 | <a name="l00164"></a>00164 <span class="keyword">public</span>: |
| 119 | <a name="l00166"></a>00166 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt ); |
| 120 | <a name="l00168"></a>00168 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt, ivec &indeces ); |
| 121 | <a name="l00170"></a>00170 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ); |
| 122 | <a name="l00172"></a>00172 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut, ivec &indeces ); |
| 123 | <a name="l00178"></a>00178 <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &urv ); |
| 124 | <a name="l00179"></a>00179 |
| 125 | <a name="l00181"></a>00181 <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system...">step</a>(); |
| 126 | <a name="l00182"></a>00182 |
| 127 | <a name="l00183"></a>00183 }; |
| 128 | <a name="l00184"></a>00184 |
| 129 | <a name="l00189"></a><a class="code" href="classBM.html">00189</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { |
| 130 | <a name="l00190"></a>00190 <span class="keyword">protected</span>: |
| 131 | <a name="l00192"></a><a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88">00192</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>; |
| 132 | <a name="l00194"></a><a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">00194</a> <span class="keywordtype">double</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>; |
| 133 | <a name="l00196"></a><a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">00196</a> <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>; |
| 134 | <a name="l00197"></a>00197 <span class="keyword">public</span>: |
| 135 | <a name="l00198"></a>00198 |
| 136 | <a name="l00200"></a><a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a">00200</a> <a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a" title="Default constructor.">BM</a>(<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0) :<a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>(rv0), <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a> ( 0 ),<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( true ) {<span class="comment">//Fixme: test rv </span> |
| 137 | <a name="l00201"></a>00201 }; |
| 138 | <a name="l00202"></a>00202 |
| 139 | <a name="l00206"></a>00206 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &dt ) = 0; |
| 140 | <a name="l00208"></a>00208 <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); |
| 141 | <a name="l00210"></a>00210 <span class="keyword">virtual</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classBM.html#3dc45554556926bde996a267636abe55" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>()=0; |
| 142 | <a name="l00211"></a>00211 |
| 143 | <a name="l00213"></a><a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">00213</a> <span class="keyword">virtual</span> <a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd" title="Destructor for future use;.">~BM</a>() {}; |
| 144 | <a name="l00214"></a>00214 }; |
| 145 | <a name="l00215"></a>00215 |
| 146 | <a name="l00225"></a><a class="code" href="classBMcond.html">00225</a> <span class="keyword">class </span><a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a> { |
| 147 | <a name="l00226"></a>00226 <span class="keyword">protected</span>: |
| 148 | <a name="l00227"></a>00227 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvc; |
| 149 | <a name="l00228"></a>00228 <span class="keyword">public</span>: |
| 150 | <a name="l00230"></a>00230 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &val ) =0; |
| 151 | <a name="l00231"></a>00231 <span class="keyword">virtual</span> ~<a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a>(){}; |
| 152 | <a name="l00232"></a>00232 }; |
| 153 | <a name="l00233"></a>00233 |
| 154 | <a name="l00234"></a>00234 <span class="preprocessor">#endif // BM_H</span> |
| 155 | </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by |