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

doc

Files:
1 modified

Legend:

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

    r255 r261  
    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/git/mixpp/bdm/stat/libDS.h Source File</title> 
     3<title>mixpp: libDS.h Source File</title> 
    44<link href="doxygen.css" rel="stylesheet" type="text/css"> 
    55<link href="tabs.css" rel="stylesheet" type="text/css"> 
     
    1212      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li> 
    1313      <li><a href="modules.html"><span>Modules</span></a></li> 
    14       <li><a href="annotated.html"><span>Classes</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> 
    1516      <li class="current"><a href="files.html"><span>Files</span></a></li> 
    1617    </ul> 
    1718  </div> 
    18 <h1>work/git/mixpp/bdm/stat/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  
     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  
    1920<a name="l00013"></a>00013 <span class="preprocessor">#ifndef DS_H</span> 
    2021<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define DS_H</span> 
    2122<a name="l00015"></a>00015 <span class="preprocessor"></span> 
    22 <a name="l00016"></a>00016 <span class="preprocessor">#include &lt;itpp/itbase.h&gt;</span> 
     23<a name="l00016"></a>00016  
    2324<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> 
    24 <a name="l00018"></a>00018  
    25 <a name="l00019"></a>00019 <span class="keyword">namespace </span>bdm{ 
    26 <a name="l00027"></a><a class="code" href="classbdm_1_1MemDS.html">00027</a> <span class="keyword">class </span><a class="code" href="classbdm_1_1MemDS.html" title="Class representing off-line data stored in memory.">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> { 
    27 <a name="l00028"></a>00028 mat Data; 
    28 <a name="l00029"></a>00029 <span class="keywordtype">int</span> time; 
    29 <a name="l00030"></a>00030 ivec rowid; 
    30 <a name="l00031"></a>00031 ivec delays; 
    31 <a name="l00032"></a>00032  
    32 <a name="l00033"></a>00033 <span class="keyword">public</span>: 
    33 <a name="l00034"></a>00034         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#23522b9e7dd0bb0c365cc9cde4c05449" title="Returns full vector of observed data.">getdata</a>(vec &amp;dt); 
    34 <a name="l00035"></a>00035         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#23522b9e7dd0bb0c365cc9cde4c05449" title="Returns full vector of observed data.">getdata</a>(vec &amp;dt, ivec &amp;indeces); 
    35 <a name="l00036"></a>00036         <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1MemDS.html#5f72b555e0e4a61de1440c457cf57007" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</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); 
    36 <a name="l00037"></a><a class="code" href="classbdm_1_1MemDS.html#9a7f17598fe2b458707ba932865beef5">00037</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 &amp;ut){it_error(<span class="stringliteral">"MemDS::write is not supported"</span>);} 
    37 <a name="l00038"></a><a class="code" href="classbdm_1_1MemDS.html#d9af4563d430d8a3f15aa03581e52ef0">00038</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 &amp;ut,ivec &amp;indexes){it_error(<span class="stringliteral">"MemDS::write is not supported"</span>);} 
    38 <a name="l00039"></a>00039         <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>(); 
    39 <a name="l00041"></a>00041         <a class="code" href="classbdm_1_1MemDS.html#84cfba80cb32d07be94690658175e9c4" title="Default constructor.">MemDS</a>(mat &amp;Dat, ivec &amp;rowid, ivec &amp;delays); 
    40 <a name="l00042"></a>00042 }; 
    41 <a name="l00043"></a>00043  
    42 <a name="l00044"></a>00044 }; <span class="comment">//namespace</span> 
    43 <a name="l00045"></a>00045  
    44 <a name="l00046"></a>00046 <span class="preprocessor">#endif // DS_H</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.">getdata</a> ( vec &amp;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.">getdata</a> ( vec &amp;dt, <span class="keyword">const</span> ivec &amp;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> &amp;drv, <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> &amp;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 &amp;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 &amp;ut,ivec &amp;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 &amp;Dat, ivec &amp;rowid, ivec &amp;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                 vec Y; 
     48<a name="l00060"></a>00060                 vec H; 
     49<a name="l00062"></a>00062                 vec rgr; 
     50<a name="l00064"></a>00064                 <a class="code" href="classbdm_1_1datalink__e2e.html" title="DataLink is a connection between two data vectors Up and Down.">datalink_e2e</a> rgrlnk; 
     51<a name="l00066"></a>00066                 <a class="code" href="classbdm_1_1mlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm&lt;chmat&gt;</a> model; 
     52<a name="l00067"></a>00067                 <span class="keyword">public</span>: 
     53<a name="l00068"></a><a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595">00068</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt ){it_assert_debug(dt.length()==Y.length(),<span class="stringliteral">"ArxDS"</span>); dt=Y;}; 
     54<a name="l00069"></a><a class="code" href="classbdm_1_1ArxDS.html#fd61140869637b91bc23215ab7f45d3b">00069</a>                 <span class="keywordtype">void</span> <a class="code" href="classbdm_1_1ArxDS.html#db242e35812c311c8415bb7e31c3f595" title="Returns full vector of observed data.">getdata</a> ( vec &amp;dt, <span class="keyword">const</span> ivec &amp;indexes ){it_assert_debug(dt.length()==Y.length(),<span class="stringliteral">"ArxDS"</span>); dt=Y;}; 
     55<a name="l00070"></a><a class="code" href="classbdm_1_1ArxDS.html#8f6da8a00abba70bc58c7a4030bd8940">00070</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 ){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);}; 
     56<a name="l00071"></a><a class="code" href="classbdm_1_1ArxDS.html#7240ea989a6453e58468feea319dcf0b">00071</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, <span class="keyword">const</span> ivec &amp;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);}; 
     57<a name="l00072"></a>00072                 <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>(); 
     58<a name="l00074"></a>00074                 <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); 
     59<a name="l00076"></a><a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a">00076</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) 
     60<a name="l00077"></a>00077                 {model.<a class="code" href="classbdm_1_1mlnorm.html#5d18dec3167584338a4775c1d165d96f" title="Set A and R.">set_parameters</a>(Th0, mu0, sqR0); }; 
     61<a name="l00078"></a>00078         }; 
     62<a name="l00079"></a>00079  
     63<a name="l00080"></a>00080 }; <span class="comment">//namespace</span> 
     64<a name="l00081"></a>00081  
     65<a name="l00082"></a>00082 <span class="preprocessor">#endif // DS_H</span> 
    4566</pre></div></div> 
    46 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 27 16:29:53 2009 for mixpp by&nbsp; 
     67<hr size="1"><address style="text-align: right;"><small>Generated on Fri Feb 6 15:29:45 2009 for mixpp by&nbsp; 
    4768<a href="http://www.doxygen.org/index.html"> 
    4869<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>