root/doc/html/arx__ui_8h-source.html @ 323

Revision 323, 8.7 kB (checked in by smidl, 16 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: arx_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>arx_ui.h</h1><a href="arx__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="l00014"></a>00014 <span class="preprocessor">#ifndef ARX_UI_H</span>
67<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define ARX_UI_H</span>
68<a name="l00016"></a>00016 <span class="preprocessor"></span>
69<a name="l00017"></a>00017
70<a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="arx_8h.html" title="Bayesian Filtering for generalized autoregressive (ARX) model.">arx.h</a>"</span>
71<a name="l00019"></a>00019 <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="l00020"></a>00020
73<a name="l00041"></a><a class="code" href="classUIARX.html">00041</a> <span class="keyword">class </span><a class="code" href="classUIARX.html">UIARX</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="l00042"></a>00042 <span class="keyword">public</span>:
75<a name="l00043"></a>00043         <a class="code" href="classUIARX.html">UIARX</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">"ARXest"</span> ) {};
76<a name="l00044"></a><a class="code" href="classUIARX.html#e9ef8d41d8f10a31343d76a73b9f0f77">00044</a>         <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classUIARX.html#e9ef8d41d8f10a31343d76a73b9f0f77" title="Function building the computational object.">build</a> ( Setting &amp;S )<span class="keyword"> const </span>{
77<a name="l00045"></a>00045                 <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="l00046"></a>00046                 <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);
79<a name="l00047"></a>00047                 <span class="keywordtype">int</span> ylen = yrv-&gt;<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>();
80<a name="l00048"></a>00048                 <span class="keywordtype">int</span> rgrlen = rrv-&gt;<a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>();
81<a name="l00049"></a>00049                 
82<a name="l00050"></a>00050                 <span class="comment">//init</span>
83<a name="l00051"></a>00051                 mat V0;
84<a name="l00052"></a>00052                 <span class="keywordflow">if</span> ( S.exists ( <span class="stringliteral">"dV0"</span> ) ) {
85<a name="l00053"></a>00053                         V0=diag ( getvec(S[<span class="stringliteral">"dV0"</span>]) );
86<a name="l00054"></a>00054                 }
87<a name="l00055"></a>00055                 <span class="keywordflow">else</span> {
88<a name="l00056"></a>00056                         V0=concat ( 1e-3*ones ( ylen ), 1e-5*ones ( rgrlen ) );
89<a name="l00057"></a>00057                 }
90<a name="l00058"></a>00058                 <span class="keywordtype">double</span> nu0;
91<a name="l00059"></a>00059                 <span class="keywordflow">if</span> ( S.exists ( <span class="stringliteral">"nu0"</span> ) ) {
92<a name="l00060"></a>00060                         nu0=double(S[<span class="stringliteral">"nu0"</span>]);
93<a name="l00061"></a>00061                 }
94<a name="l00062"></a>00062                 <span class="keywordflow">else</span> {
95<a name="l00063"></a>00063                         nu0 = rgrlen+ylen+2;
96<a name="l00064"></a>00064                 }
97<a name="l00065"></a>00065                 <span class="keywordtype">double</span> frg;
98<a name="l00066"></a>00066                 <span class="keywordflow">if</span> ( S.exists ( <span class="stringliteral">"frg"</span> ) ) {
99<a name="l00067"></a>00067                         frg = S[<span class="stringliteral">"frg"</span>];
100<a name="l00068"></a>00068                 }
101<a name="l00069"></a>00069                 <span class="keywordflow">else</span> {
102<a name="l00070"></a>00070                         frg = 1.0;
103<a name="l00071"></a>00071                 }
104<a name="l00072"></a>00072                 <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>* A=<span class="keyword">new</span> <a class="code" href="classbdm_1_1ARX.html" title="Linear Autoregressive model with Gaussian noise.">ARX</a>;
105<a name="l00073"></a>00073                 A-&gt;<a class="code" href="classbdm_1_1ARX.html#7aef6fe827f15427d534e6fb2c220e04">set_parameters</a>(frg);
106<a name="l00074"></a>00074                 A-&gt;<a class="code" href="classbdm_1_1ARX.html#f859f53eab269845a9064bbd92f841af">set_statistics</a>(ylen,V0, nu0);
107<a name="l00075"></a>00075                 A-&gt;<a class="code" href="classbdm_1_1ARX.html#df3dc1b90efc0cc54a3a6e5e858542d1">set_drv</a>(concat(*yrv,*rrv));
108<a name="l00076"></a>00076                 
109<a name="l00077"></a>00077                 <span class="comment">//name results (for logging)</span>
110<a name="l00078"></a>00078                 A-&gt;<a class="code" href="classbdm_1_1BM.html#b38d92f17620813ad872d86e01a26e5e">set_rv</a>(<a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>(<span class="stringliteral">"{theta r }"</span>, vec_2(ylen*rgrlen, ylen*ylen)));
111<a name="l00079"></a>00079                 <span class="keyword">delete</span> yrv; <span class="keyword">delete</span> rrv;
112<a name="l00080"></a>00080                 <span class="keywordflow">return</span> A;
113<a name="l00081"></a>00081         };
114<a name="l00082"></a>00082 };
115<a name="l00083"></a>00083
116<a name="l00084"></a>00084 UIREGISTER ( <a class="code" href="classUIARX.html">UIARX</a> );
117<a name="l00085"></a>00085
118<a name="l00086"></a>00086 <span class="preprocessor">#endif // DS_UI_H</span>
119</pre></div></div>
120<hr size="1"><address style="text-align: right;"><small>Generated on Thu Apr 23 21:06:42 2009 for mixpp by&nbsp;
121<a href="http://www.doxygen.org/index.html">
122<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
123</body>
124</html>
Note: See TracBrowser for help on using the browser.