Show
Ignore:
Timestamp:
02/16/09 10:02:08 (16 years ago)
Author:
smidl
Message:

Changes in the very root classes!
* rv and rvc are no longer compulsory,
* samplecond does not return ll
* BM has drv

Files:
1 modified

Legend:

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

    r269 r270  
    5050<a name="l00063"></a><a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5">00063</a>                 vec <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>; 
    5151<a name="l00065"></a><a class="code" href="classbdm_1_1ArxDS.html#b2d7530264499b92c3aa32454b960abe">00065</a>                 vec <a class="code" href="classbdm_1_1ArxDS.html#b2d7530264499b92c3aa32454b960abe" title="temporary variable for regressor">rgr</a>; 
    52 <a name="l00067"></a><a class="code" href="classbdm_1_1ArxDS.html#1520556e3577db8c72b902e633d68e5a">00067</a>                 <a class="code" href="classbdm_1_1datalink__e2e.html" title="DataLink is a connection between two data vectors Up and Down.">datalink_e2e</a> <a class="code" href="classbdm_1_1ArxDS.html#1520556e3577db8c72b902e633d68e5a" title="data link: H -&amp;gt; rgr">rgrlnk</a>; 
     52<a name="l00067"></a><a class="code" href="classbdm_1_1ArxDS.html#2d30d78ba1f16d66267ab8fc2c9cfb5d">00067</a>                 <a class="code" href="classbdm_1_1datalink.html" title="DataLink is a connection between two data vectors Up and Down.">datalink</a> *<a class="code" href="classbdm_1_1ArxDS.html#2d30d78ba1f16d66267ab8fc2c9cfb5d" title="data link: H -&amp;gt; rgr">rgrlnk</a>; 
    5353<a name="l00069"></a><a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb">00069</a>                 <a class="code" href="classbdm_1_1mlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm&lt;chmat&gt;</a> <a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>; 
    5454<a name="l00071"></a><a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1">00071</a>                 <span class="keywordtype">bool</span> <a class="code" href="classbdm_1_1ArxDS.html#064e5d3f2dc0b39459c7ca53d05223e1" title="options">opt_L_theta</a>; 
     
    5757<a name="l00075"></a>00075         <span class="keyword">public</span>: 
    5858<a name="l00076"></a><a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595">00076</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 &amp;dt ) { 
    59 <a name="l00077"></a>00077                         it_assert_debug ( dt.length() ==<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Observed variables, returned by getdata().">Drv</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> ); 
    60 <a name="l00078"></a>00078                         dt=<a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.left ( <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>() +<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Observed variables, returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#2174751a00ce19f941edd2c1a861be67" title="Return number of scalars in the RV.">count</a>() ); 
     59<a name="l00077"></a>00077                         it_assert_debug ( dt.length() ==<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.count(),<span class="stringliteral">"ArxDS"</span> ); 
     60<a name="l00078"></a>00078                         dt=<a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>.left ( <a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() +<a class="code" href="classbdm_1_1DS.html#d8db125ac35f3b8eeb773fc9a4cb45ec" title="Description of data returned by getdata().">Drv</a>.<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ); 
    6161<a name="l00079"></a>00079                 }; 
    6262<a name="l00080"></a><a class="code" href="classbdm_1_1ArxDS.html#fd61140869637b91bc23215ab7f45d3b">00080</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 &amp;dt, <span class="keyword">const</span> ivec &amp;indexes ) { 
     
    6565<a name="l00083"></a>00083                 }; 
    6666<a name="l00084"></a><a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940">00084</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 &amp;ut ) { 
    67 <a name="l00085"></a>00085                         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> ); 
     67<a name="l00085"></a>00085                         it_assert_debug ( ut.length() ==<a class="code" href="classbdm_1_1DS.html#9ac5970128fd39f4f6226723cd1de702" title="Description of data witten by by write().">Urv</a>.count(),<span class="stringliteral">"ArxDS"</span> ); 
    6868<a name="l00086"></a>00086                         <a class="code" href="classbdm_1_1ArxDS.html#392b87be85675cb3d55fa4953d671bb5" title="(future) input">U</a>=ut; 
    6969<a name="l00087"></a>00087                 }; 
     
    7373<a name="l00091"></a>00091                 }; 
    7474<a name="l00092"></a>00092                 <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>(); 
    75 <a name="l00094"></a>00094                 <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> &amp;drv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;urv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;rrv ); 
     75<a name="l00094"></a><a class="code" href="classbdm_1_1ArxDS.html#7c8b418677a48041adacac8e8e9c9849">00094</a>                 <a class="code" href="classbdm_1_1ArxDS.html#7c8b418677a48041adacac8e8e9c9849" title="Default constructor.">ArxDS</a> ( ){}; 
    7676<a name="l00096"></a><a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a">00096</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 &amp;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> &amp;sqR0 ) 
    7777<a name="l00097"></a>00097                 { <a class="code" href="classbdm_1_1ArxDS.html#0aa9d8d35792159dc9611802f6c190eb" title="model of Y - linear Gaussian">model</a>.<a class="code" href="classbdm_1_1mlnorm.html#5d18dec3167584338a4775c1d165d96f" title="Set A and R.">set_parameters</a> ( Th0, mu0, sqR0 ); }; 
     
    9898<a name="l00119"></a>00119         <span class="keyword">class </span>ARXDS : <span class="keyword">public</span> ArxDS { 
    9999<a name="l00120"></a>00120         <span class="keyword">public</span>: 
    100 <a name="l00121"></a>00121                 ARXDS ( RV &amp;drv, RV &amp;urv, RV &amp;rrv ) : ArxDS ( drv,urv,rrv ) {} 
     100<a name="l00121"></a>00121                 ARXDS ( ) : ArxDS ( ) {} 
    101101<a name="l00122"></a>00122  
    102102<a name="l00123"></a>00123                 <span class="keywordtype">void</span> getdata ( vec &amp;dt ) {dt=<a class="code" href="classbdm_1_1ArxDS.html#a11a3f3fbeea1d17b66b073017964597" title="History, ordered as .">H</a>;} 
     
    118118<a name="l00145"></a>00145                 <span class="keywordtype">void</span> getdata ( vec &amp;dt0, <span class="keyword">const</span> ivec &amp;indeces ) {dt0=dt ( indeces );} 
    119119<a name="l00146"></a>00146  
    120 <a name="l00147"></a>00147                 stateDS ( mpdf* IM0, mpdf* OM0, RV &amp;Urv0 ) :DS ( OM0-&gt;_rv(),Urv0 ),IM ( IM0 ),OM ( OM0 ), 
    121 <a name="l00148"></a>00148                                 dt ( OM0-&gt;_rv().count() ), xt ( IM0-&gt;_rv().count() ), ut ( Urv0.count() ) {} 
     120<a name="l00147"></a>00147                 stateDS ( mpdf* IM0, mpdf* OM0, <span class="keywordtype">int</span> usize ) :<a class="code" href="classbdm_1_1DS.html#bedd82e08ae6686b4b1732a122c2201a" title="default constructors">DS</a> ( ),IM ( IM0 ),OM ( OM0 ), 
     121<a name="l00148"></a>00148                                 dt ( OM0-&gt;dimension() ), xt ( IM0-&gt;dimension() ), ut ( usize) {} 
    122122<a name="l00149"></a>00149                 ~stateDS() {<span class="keyword">delete</span> IM; <span class="keyword">delete</span> OM;} 
    123123<a name="l00150"></a>00150                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> step() { 
    124 <a name="l00151"></a>00151                         <span class="keywordtype">double</span> tmp; 
    125 <a name="l00152"></a>00152                         xt=IM-&gt;samplecond(<a class="code" href="namespacebdm.html#b9016687c0e874ca5cdcf75ae28811aa" title="Concat two random variables.">concat</a> ( xt,ut )); 
    126 <a name="l00153"></a>00153                         dt=OM-&gt;samplecond(<a class="code" href="namespacebdm.html#b9016687c0e874ca5cdcf75ae28811aa" title="Concat two random variables.">concat</a> ( xt,ut )); 
    127 <a name="l00154"></a>00154                 }; 
    128 <a name="l00155"></a>00155                  
    129 <a name="l00156"></a>00156                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> log_add ( logger &amp;L ) { 
    130 <a name="l00157"></a>00157                         <a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e" title="Register DS for logging into logger L.">DS::log_add</a> ( L ); 
    131 <a name="l00158"></a>00158                         L_xt=L.add(IM-&gt;_rv(),<span class="stringliteral">"true"</span>); 
    132 <a name="l00159"></a>00159                 } 
    133 <a name="l00160"></a>00160                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> logit ( logger &amp;L ) { 
    134 <a name="l00161"></a>00161                         <a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf" title="Register DS for logging into logger L.">DS::logit</a> ( L ); 
    135 <a name="l00162"></a>00162                         L.logit ( L_xt,xt); 
    136 <a name="l00163"></a>00163                 } 
    137 <a name="l00164"></a>00164  
    138 <a name="l00165"></a>00165         }; 
    139 <a name="l00166"></a>00166  
    140 <a name="l00167"></a>00167 }; <span class="comment">//namespace</span> 
    141 <a name="l00168"></a>00168  
    142 <a name="l00169"></a>00169 <span class="preprocessor">#endif // DS_H</span> 
     124<a name="l00151"></a>00151                         xt=IM-&gt;samplecond(<a class="code" href="namespacebdm.html#b9016687c0e874ca5cdcf75ae28811aa" title="Concat two random variables.">concat</a> ( xt,ut )); 
     125<a name="l00152"></a>00152                         dt=OM-&gt;samplecond(<a class="code" href="namespacebdm.html#b9016687c0e874ca5cdcf75ae28811aa" title="Concat two random variables.">concat</a> ( xt,ut )); 
     126<a name="l00153"></a>00153                 }; 
     127<a name="l00154"></a>00154                  
     128<a name="l00155"></a>00155                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> log_add ( logger &amp;L ) { 
     129<a name="l00156"></a>00156                         <a class="code" href="classbdm_1_1DS.html#3c9e417d85052396fe74c164857ee67e" title="Register DS for logging into logger L.">DS::log_add</a> ( L ); 
     130<a name="l00157"></a>00157                         L_xt=L.add(IM-&gt;_rv(),<span class="stringliteral">"true"</span>); 
     131<a name="l00158"></a>00158                 } 
     132<a name="l00159"></a>00159                 <span class="keyword">virtual</span> <span class="keywordtype">void</span> logit ( logger &amp;L ) { 
     133<a name="l00160"></a>00160                         <a class="code" href="classbdm_1_1DS.html#e03d2c93cddd5c3a03107ddd3ae999cf" title="Register DS for logging into logger L.">DS::logit</a> ( L ); 
     134<a name="l00161"></a>00161                         L.logit ( L_xt,xt); 
     135<a name="l00162"></a>00162                 } 
     136<a name="l00163"></a>00163  
     137<a name="l00164"></a>00164         }; 
     138<a name="l00165"></a>00165  
     139<a name="l00166"></a>00166 }; <span class="comment">//namespace</span> 
     140<a name="l00167"></a>00167  
     141<a name="l00168"></a>00168 <span class="preprocessor">#endif // DS_H</span> 
    143142</pre></div></div> 
    144 <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 10:20:05 2009 for mixpp by&nbsp; 
     143<hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 23:33:55 2009 for mixpp by&nbsp; 
    145144<a href="http://www.doxygen.org/index.html"> 
    146145<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>