| 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="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 | <script type="text/javascript"> | 
|---|
| 9 | <!-- | 
|---|
| 10 | function 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 | } | 
|---|
| 22 | function 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 | } | 
|---|
| 46 | window.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 Page</span></a></li> | 
|---|
| 53 | <li><a href="pages.html"><span>Related Pages</span></a></li> | 
|---|
| 54 | <li><a href="modules.html"><span>Modules</span></a></li> | 
|---|
| 55 | <li><a href="classes.html"><span>Classes</span></a></li> | 
|---|
| 56 | <li class="current"><a href="files.html"><span>Files</span></a></li> | 
|---|
| 57 | </ul> | 
|---|
| 58 | </div> | 
|---|
| 59 | <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 | 
|---|
| 60 | <a name="l00013"></a>00013 <span class="preprocessor">#ifndef DS_UI_H</span> | 
|---|
| 61 | <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define DS_UI_H</span> | 
|---|
| 62 | <a name="l00015"></a>00015 <span class="preprocessor"></span> | 
|---|
| 63 | <a name="l00016"></a>00016 | 
|---|
| 64 | <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="libDS_8h.html" title="Common DataSources.">libDS.h</a>"</span> | 
|---|
| 65 | <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> | 
|---|
| 66 | <a name="l00019"></a>00019 | 
|---|
| 67 | <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> { | 
|---|
| 68 | <a name="l00052"></a>00052 <span class="keyword">public</span>: | 
|---|
| 69 | <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> ) {}; | 
|---|
| 70 | <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 &S )<span class="keyword"> const </span>{ | 
|---|
| 71 | <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); | 
|---|
| 72 | <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); | 
|---|
| 73 | <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); | 
|---|
| 74 | <a name="l00058"></a>00058 | 
|---|
| 75 | <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>; | 
|---|
| 76 | <a name="l00060"></a>00060                 mat Th=getmat ( S[<span class="stringliteral">"theta"</span>], rrv-><a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ); | 
|---|
| 77 | <a name="l00061"></a>00061                 vec mu0; | 
|---|
| 78 | <a name="l00062"></a>00062                 <span class="keywordflow">if</span> ( S.exists ( <span class="stringliteral">"offset"</span> ) ) { | 
|---|
| 79 | <a name="l00063"></a>00063                         mu0=getvec ( S[<span class="stringliteral">"offset"</span>] ); | 
|---|
| 80 | <a name="l00064"></a>00064                 } | 
|---|
| 81 | <a name="l00065"></a>00065                 <span class="keywordflow">else</span> { | 
|---|
| 82 | <a name="l00066"></a>00066                         mu0=zeros ( yrv-><a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ); | 
|---|
| 83 | <a name="l00067"></a>00067                 } | 
|---|
| 84 | <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-><a class="code" href="classbdm_1_1RV.html#de30156104f61d86c94f758861418089">_dsize</a>() ) ); | 
|---|
| 85 | <a name="l00069"></a>00069                 tmp-><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 ); | 
|---|
| 86 | <a name="l00070"></a>00070                 tmp-><a class="code" href="classbdm_1_1ArxDS.html#bf9cd9d4043d7e0dc61de56db37ec703" title="Set.">set_drv</a>(*yrv,*urv,*rrv); | 
|---|
| 87 | <a name="l00071"></a>00071                 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"opt"</span>)){tmp-><a class="code" href="classbdm_1_1ArxDS.html#e7438127de87c5a8128edfa12255b436" title="set options from a string">set_options</a>(S[<span class="stringliteral">"opt"</span>]);} | 
|---|
| 88 | <a name="l00072"></a>00072                 <span class="keywordflow">return</span> tmp; | 
|---|
| 89 | <a name="l00073"></a>00073         }; | 
|---|
| 90 | <a name="l00074"></a>00074 }; | 
|---|
| 91 | <a name="l00075"></a>00075 | 
|---|
| 92 | <a name="l00076"></a>00076 UIREGISTER ( <a class="code" href="classUIArxDS.html">UIArxDS</a> ); | 
|---|
| 93 | <a name="l00077"></a>00077 | 
|---|
| 94 | <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> { | 
|---|
| 95 | <a name="l00109"></a>00109         <span class="keyword">public</span>: | 
|---|
| 96 | <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> ) {}; | 
|---|
| 97 | <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 &S )<span class="keyword"> const </span>{ | 
|---|
| 98 | <a name="l00112"></a>00112                         <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>* rvtmp; | 
|---|
| 99 | <a name="l00113"></a>00113                         UIbuild(S[<span class="stringliteral">"IM"</span>][<span class="stringliteral">"rvu"</span>], rvtmp); | 
|---|
| 100 | <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; | 
|---|
| 101 | <a name="l00115"></a>00115                         UIbuild(S[<span class="stringliteral">"IM"</span>],IM); | 
|---|
| 102 | <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; | 
|---|
| 103 | <a name="l00117"></a>00117                         UIbuild(S[<span class="stringliteral">"OM"</span>],OM); | 
|---|
| 104 | <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); | 
|---|
| 105 | <a name="l00119"></a>00119                         <span class="comment">//DS->set_drv(rvtmp);</span> | 
|---|
| 106 | <a name="l00120"></a>00120                         <span class="keywordflow">return</span> DS; | 
|---|
| 107 | <a name="l00121"></a>00121                 } | 
|---|
| 108 | <a name="l00122"></a>00122 }; | 
|---|
| 109 | <a name="l00123"></a>00123 UIREGISTER ( <a class="code" href="classUIstateDS.html">UIstateDS</a> ); | 
|---|
| 110 | <a name="l00124"></a>00124 <span class="preprocessor">#endif // DS_UI_H</span> | 
|---|
| 111 | </pre></div></div> | 
|---|
| 112 | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 18 17:38:40 2009 for mixpp by  | 
|---|
| 113 | <a href="http://www.doxygen.org/index.html"> | 
|---|
| 114 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> | 
|---|
| 115 | </body> | 
|---|
| 116 | </html> | 
|---|