root/doc/html/libDS__ui_8h-source.html @ 368

Revision 368, 12.7 kB (checked in by smidl, 15 years ago)

doc

Line 
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_ui.h Source File</title>
4<link href="tabs.css" rel="stylesheet" type="text/css">
5<link href="doxygen.css" rel="stylesheet" type="text/css">
6</head><body>
7<!-- Generated by Doxygen 1.5.8 -->
8<script type="text/javascript">
9<!--
10function changeDisplayState (e){
11  var num=this.id.replace(/[^[0-9]/g,'');
12  var button=this.firstChild;
13  var sectionDiv=document.getElementById('dynsection'+num);
14  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
15    sectionDiv.style.display='block';
16    button.src='open.gif';
17  }else{
18    sectionDiv.style.display='none';
19    button.src='closed.gif';
20  }
21}
22function initDynSections(){
23  var divs=document.getElementsByTagName('div');
24  var sectionCounter=1;
25  for(var i=0;i<divs.length-1;i++){
26    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
27      var header=divs[i];
28      var section=divs[i+1];
29      var button=header.firstChild;
30      if (button!='IMG'){
31        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
32        button=document.createElement('img');
33        divs[i].insertBefore(button,divs[i].firstChild);
34      }
35      header.style.cursor='pointer';
36      header.onclick=changeDisplayState;
37      header.id='dynheader'+sectionCounter;
38      button.src='closed.gif';
39      section.id='dynsection'+sectionCounter;
40      section.style.display='none';
41      section.style.marginLeft='14px';
42      sectionCounter++;
43    }
44  }
45}
46window.onload = initDynSections;
47-->
48</script>
49<div class="navigation" id="top">
50  <div class="tabs">
51    <ul>
52      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
53      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
54      <li><a href="modules.html"><span>Modules</span></a></li>
55      <li><a href="annotated.html"><span>Classes</span></a></li>
56      <li class="current"><a href="files.html"><span>Files</span></a></li>
57    </ul>
58  </div>
59  <div class="tabs">
60    <ul>
61      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
62      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
63    </ul>
64  </div>
65<h1>libDS_ui.h</h1><a href="libDS__ui_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001
66<a name="l00013"></a>00013 <span class="preprocessor">#ifndef DS_UI_H</span>
67<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define DS_UI_H</span>
68<a name="l00015"></a>00015 <span class="preprocessor"></span>
69<a name="l00016"></a>00016
70<a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="libDS_8h.html" title="Common DataSources.">libDS.h</a>"</span>
71<a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="loggers__ui_8h.html" title="UI builders for Loggers.">stat/loggers_ui.h</a>"</span>
72<a name="l00019"></a>00019
73<a name="l00051"></a><a class="code" href="classUIArxDS.html">00051</a> <span class="keyword">class </span><a class="code" href="classUIArxDS.html">UIArxDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> {
74<a name="l00052"></a>00052 <span class="keyword">public</span>:
75<a name="l00053"></a>00053         <a class="code" href="classUIArxDS.html">UIArxDS</a>() :<a class="code" href="classbdm_1_1UIbuilder.html#c75103dd58395644e80f1eea886c656b" title="Constructor needs to be run only once macro UIREGISTER.">UIbuilder</a> ( <span class="stringliteral">"ArxDS"</span> ) {};
76<a name="l00054"></a><a class="code" href="classUIArxDS.html#f29ba9f6bb21461d3c061701b8ba366f">00054</a>         <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classUIArxDS.html#f29ba9f6bb21461d3c061701b8ba366f" title="Function building the computational object.">build</a> ( Setting &amp;S )<span class="keyword"> const </span>{
77<a name="l00055"></a>00055                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> *yrv; UIbuild(S[<span class="stringliteral">"y"</span>],yrv);
78<a name="l00056"></a>00056                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> *urv; UIbuild(S[<span class="stringliteral">"u"</span>],urv);
79<a name="l00057"></a>00057                 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> *rrv; UIbuild(S[<span class="stringliteral">"rgr"</span>],rrv);
80<a name="l00058"></a>00058                 
81<a name="l00059"></a>00059                 <a class="code" href="classbdm_1_1ArxDS.html" title="Generator of ARX data.">ArxDS</a>* tmp = <span class="keyword">new</span> <a class="code" href="classbdm_1_1ArxDS.html" title="Generator of ARX data.">ArxDS</a>;
82<a name="l00060"></a>00060                 mat Th=getmat ( S[<span class="stringliteral">"theta"</span>], rrv-&gt;<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() );
83<a name="l00061"></a>00061                 vec mu0;
84<a name="l00062"></a>00062                 <span class="keywordflow">if</span> ( S.exists ( <span class="stringliteral">"offset"</span> ) ) {
85<a name="l00063"></a>00063                         mu0=getvec ( S[<span class="stringliteral">"offset"</span>] );
86<a name="l00064"></a>00064                 }
87<a name="l00065"></a>00065                 <span class="keywordflow">else</span> {
88<a name="l00066"></a>00066                         mu0=zeros ( yrv-&gt;<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() );
89<a name="l00067"></a>00067                 }
90<a name="l00068"></a>00068                 <a class="code" href="classchmat.html" title="Symmetric matrix stored in square root decomposition using upper cholesky.">chmat</a> sqR ( getmat ( S[<span class="stringliteral">"r"</span>],yrv-&gt;<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ) );
91<a name="l00069"></a>00069                 tmp-&gt;<a class="code" href="classbdm_1_1ArxDS.html#2d9abc62f1fee862f0e1c60c5c4a3c8a" title="Set parameters of the internal model, H is maximum time delay.">set_parameters</a> ( Th,mu0,sqR );
92<a name="l00070"></a>00070                 tmp-&gt;<a class="code" href="classbdm_1_1ArxDS.html#bf9cd9d4043d7e0dc61de56db37ec703" title="Set.">set_drv</a>(*yrv,*urv,*rrv);
93<a name="l00071"></a>00071                 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"opt"</span>)){tmp-&gt;<a class="code" href="classbdm_1_1ArxDS.html#e7438127de87c5a8128edfa12255b436" title="set options from a string">set_options</a>(S[<span class="stringliteral">"opt"</span>]);}
94<a name="l00072"></a>00072                 <span class="keywordflow">return</span> tmp;
95<a name="l00073"></a>00073         };
96<a name="l00074"></a>00074 };
97<a name="l00075"></a>00075
98<a name="l00076"></a>00076 UIREGISTER ( <a class="code" href="classUIArxDS.html">UIArxDS</a> );
99<a name="l00077"></a>00077
100<a name="l00108"></a><a class="code" href="classUIstateDS.html">00108</a> <span class="keyword">class </span><a class="code" href="classUIstateDS.html">UIstateDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> {
101<a name="l00109"></a>00109         <span class="keyword">public</span>:
102<a name="l00110"></a>00110                 <a class="code" href="classUIstateDS.html">UIstateDS</a>() :<a class="code" href="classbdm_1_1UIbuilder.html#c75103dd58395644e80f1eea886c656b" title="Constructor needs to be run only once macro UIREGISTER.">UIbuilder</a> ( <span class="stringliteral">"stateDS"</span> ) {};
103<a name="l00111"></a><a class="code" href="classUIstateDS.html#972d0b59ec756a4e4247e7febd2383fa">00111</a>                 <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classUIstateDS.html#972d0b59ec756a4e4247e7febd2383fa" title="Function building the computational object.">build</a> ( Setting &amp;S )<span class="keyword"> const </span>{
104<a name="l00112"></a>00112                         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>* rvtmp;
105<a name="l00113"></a>00113                         UIbuild(S[<span class="stringliteral">"IM"</span>][<span class="stringliteral">"rvu"</span>], rvtmp);
106<a name="l00114"></a>00114                         <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* IM;
107<a name="l00115"></a>00115                         UIbuild(S[<span class="stringliteral">"IM"</span>],IM);
108<a name="l00116"></a>00116                         <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* OM;
109<a name="l00117"></a>00117                         UIbuild(S[<span class="stringliteral">"OM"</span>],OM);
110<a name="l00118"></a>00118                         stateDS *<a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a>=<span class="keyword">new</span> stateDS(IM,OM,0);
111<a name="l00119"></a>00119                         <span class="comment">//DS-&gt;set_drv(rvtmp);</span>
112<a name="l00120"></a>00120                         <span class="keywordflow">return</span> DS;
113<a name="l00121"></a>00121                 }
114<a name="l00122"></a>00122 };
115<a name="l00123"></a>00123 UIREGISTER ( <a class="code" href="classUIstateDS.html">UIstateDS</a> );
116<a name="l00124"></a>00124
117<a name="l00131"></a><a class="code" href="classUIITppFileDS.html">00131</a> <span class="keyword">class </span><a class="code" href="classUIITppFileDS.html" title="UI for reading data from files.">UIITppFileDS</a> : <span class="keyword">public</span> <a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> {
118<a name="l00132"></a>00132         <span class="keyword">public</span>:
119<a name="l00133"></a>00133                 <a class="code" href="classUIITppFileDS.html" title="UI for reading data from files.">UIITppFileDS</a>() :<a class="code" href="classbdm_1_1UIbuilder.html#c75103dd58395644e80f1eea886c656b" title="Constructor needs to be run only once macro UIREGISTER.">UIbuilder</a> ( <span class="stringliteral">"ITppFileDS"</span> ) {};
120<a name="l00134"></a><a class="code" href="classUIITppFileDS.html#22f2a225413d1fe9c909d10df25c4145">00134</a>                 <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classUIITppFileDS.html#22f2a225413d1fe9c909d10df25c4145" title="Function building the computational object.">build</a> ( Setting &amp;S )<span class="keyword"> const </span>{
121<a name="l00135"></a>00135                         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>* rvtmp;
122<a name="l00136"></a>00136                         UIbuild(S[<span class="stringliteral">"rv"</span>], rvtmp);
123<a name="l00137"></a>00137                         <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a> *<a class="code" href="classbdm_1_1DS.html" title="Abstract class for discrete-time sources of data.">DS</a>=<span class="keyword">new</span> <a class="code" href="classbdm_1_1ITppFileDS.html" title="Read Data Matrix from an IT file.">ITppFileDS</a>(S[<span class="stringliteral">"filename"</span>],S[<span class="stringliteral">"varname"</span>]);
124<a name="l00138"></a>00138                         DS-&gt;<a class="code" href="classbdm_1_1DS.html#821297dfd839d68691324f024e57252f" title="set random rvariables">set_drv</a>(*rvtmp,<a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>());
125<a name="l00139"></a>00139                         <span class="keywordflow">return</span> DS;
126<a name="l00140"></a>00140                 }
127<a name="l00141"></a>00141 };
128<a name="l00142"></a>00142 UIREGISTER ( <a class="code" href="classUIITppFileDS.html" title="UI for reading data from files.">UIITppFileDS</a> );
129<a name="l00143"></a>00143
130<a name="l00144"></a>00144 <span class="preprocessor">#endif // DS_UI_H</span>
131</pre></div></div>
132<hr size="1"><address style="text-align: right;"><small>Generated on Mon Jun 8 18:02:32 2009 for mixpp by&nbsp;
133<a href="http://www.doxygen.org/index.html">
134<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
135</body>
136</html>
Note: See TracBrowser for help on using the browser.