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: libDS.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.6 --> |
---|
8 | <div class="navigation" id="top"> |
---|
9 | <div class="tabs"> |
---|
10 | <ul> |
---|
11 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
12 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
13 | <li><a href="modules.html"><span>Modules</span></a></li> |
---|
14 | <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
---|
15 | <li><a href="classes.html"><span>Classes</span></a></li> |
---|
16 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
17 | </ul> |
---|
18 | </div> |
---|
19 | <h1>libDS.h</h1><a href="libDS_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 |
---|
20 | <a name="l00013"></a>00013 <span class="preprocessor">#ifndef DS_H</span> |
---|
21 | <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define DS_H</span> |
---|
22 | <a name="l00015"></a>00015 <span class="preprocessor"></span> |
---|
23 | <a name="l00016"></a>00016 |
---|
24 | <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> |
---|
25 | <a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="libEF_8h.html" title="Probability distributions for Exponential Family models.">libEF.h</a>"</span> |
---|
26 | <a name="l00019"></a>00019 |
---|
27 | <a name="l00020"></a>00020 |
---|
28 | <a name="l00021"></a>00021 <span class="keyword">namespace </span>bdm { |
---|
29 | <a name="l00029"></a><a class="code" href="classbdm_1_1MemDS.html">00029</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1MemDS.html" title="Memory storage of off-line data column-wise.">MemDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
---|
30 | <a name="l00031"></a>00031 mat Data; |
---|
31 | <a name="l00033"></a>00033 <span class="keywordtype">int</span> time; |
---|
32 | <a name="l00035"></a>00035 ivec rowid; |
---|
33 | <a name="l00037"></a>00037 ivec delays; |
---|
34 | <a name="l00038"></a>00038 |
---|
35 | <a name="l00039"></a>00039 <span class="keyword">public</span>: |
---|
36 | <a name="l00040"></a>00040 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#23522b9e7dd0bb0c365cc9cde4c05449" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt ); |
---|
37 | <a name="l00041"></a>00041 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#23522b9e7dd0bb0c365cc9cde4c05449" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indeces ); |
---|
38 | <a name="l00042"></a>00042 <span class="keywordtype">void</span> linkrvs ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &urv ); |
---|
39 | <a name="l00043"></a><a class="code" href="classbdm_1_1MemDS.html#9a7f17598fe2b458707ba932865beef5">00043</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#9a7f17598fe2b458707ba932865beef5" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ) {it_error ( <span class="stringliteral">"MemDS::write is not supported"</span> );} |
---|
40 | <a name="l00044"></a>00044 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#9a7f17598fe2b458707ba932865beef5" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut,ivec &indexes ) {it_error ( <span class="stringliteral">"MemDS::write is not supported"</span> );} |
---|
41 | <a name="l00045"></a>00045 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#21916feb3e5ff960855c09b06a0d279b" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
---|
42 | <a name="l00047"></a>00047 <a class="code" href="classbdm_1_1MemDS.html#84cfba80cb32d07be94690658175e9c4" title="Default constructor.">MemDS</a> ( mat &Dat, ivec &rowid, ivec &delays ); |
---|
43 | <a name="l00048"></a>00048 }; |
---|
44 | <a name="l00049"></a>00049 |
---|
45 | <a name="l00054"></a><a class="code" href="classbdm_1_1ArxDS.html">00054</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1ArxDS.html" title="Generator of ARX data.">ArxDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a> { |
---|
46 | <a name="l00056"></a>00056 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> Rrv; |
---|
47 | <a name="l00058"></a>00058 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> Hrv; |
---|
48 | <a name="l00060"></a>00060 vec Y; |
---|
49 | <a name="l00062"></a>00062 vec H; |
---|
50 | <a name="l00064"></a>00064 vec rgr; |
---|
51 | <a name="l00066"></a>00066 datalink_e2e rgrlnk; |
---|
52 | <a name="l00068"></a>00068 <a class="code" href="classbdm_1_1mlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm<chmat></a> model; |
---|
53 | <a name="l00069"></a>00069 <span class="keyword">public</span>: |
---|
54 | <a name="l00070"></a><a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595">00070</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt ){it_assert_debug(dt.length()==Y.length(),<span class="stringliteral">"ArxDS"</span>); dt=Y;}; |
---|
55 | <a name="l00071"></a><a class="code" href="classbdm_1_1ArxDS.html#fd61140869637b91bc23215ab7f45d3b">00071</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data=[output, input].">getdata</a> ( vec &dt, <span class="keyword">const</span> ivec &indexes ){it_assert_debug(dt.length()==Y.length(),<span class="stringliteral">"ArxDS"</span>); dt=Y(indexes);}; |
---|
56 | <a name="l00072"></a><a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940">00072</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ){it_assert_debug(ut.length()==<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Action variables, accepted by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>(),<span class="stringliteral">"ArxDS"</span>); H.set_subvector(0,ut);}; |
---|
57 | <a name="l00073"></a><a class="code" href="classbdm_1_1ArxDS.html#7240ea989a6453e58468feea319dcf0b">00073</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut, <span class="keyword">const</span> ivec &indexes ){it_assert_debug(ut.length()==<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Action variables, accepted by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>(),<span class="stringliteral">"ArxDS"</span>); set_subvector(H,indexes,ut);}; |
---|
58 | <a name="l00074"></a>00074 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#57dfa26b23cc03d53b123fa7e0474b19" title="Moves from to , i.e. perfroms the actions and reads response of the system.">step</a>(); |
---|
59 | <a name="l00076"></a>00076 <a class="code" href="classbdm_1_1ArxDS.html#e6f17e13dc0c9187ed8dbb19f3c4330a" title="Default constructor.">ArxDS</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &urv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &rrv); |
---|
60 | <a name="l00078"></a><a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a">00078</a> <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a" title="Set parameters of the internal model.">set_parameters</a>(<span class="keyword">const</span> mat &Th0, <span class="keyword">const</span> vec mu0, <span class="keyword">const</span> <a class="code" href="classchmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> &sqR0) |
---|
61 | <a name="l00079"></a>00079 {model.<a class="code" href="classbdm_1_1mlnorm.html#5d18dec3167584338a4775c1d165d96f" title="Set A and R.">set_parameters</a>(Th0, mu0, sqR0); }; |
---|
62 | <a name="l00080"></a>00080 }; |
---|
63 | <a name="l00081"></a>00081 |
---|
64 | <a name="l00082"></a>00082 }; <span class="comment">//namespace</span> |
---|
65 | <a name="l00083"></a>00083 |
---|
66 | <a name="l00084"></a>00084 <span class="preprocessor">#endif // DS_H</span> |
---|
67 | </pre></div></div> |
---|
68 | <hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 6 19:49:45 2009 for mixpp by |
---|
69 | <a href="http://www.doxygen.org/index.html"> |
---|
70 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
71 | </body> |
---|
72 | </html> |
---|