[264] | 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 | <div class="navigation" id="top"> |
---|
| 9 | <div class="tabs"> |
---|
| 10 | <ul> |
---|
| 11 | <li><a href="index.html"><span>Main Page</span></a></li> |
---|
| 12 | <li><a href="pages.html"><span>Related Pages</span></a></li> |
---|
| 13 | <li><a href="modules.html"><span>Modules</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> |
---|
| 16 | <li class="current"><a href="files.html"><span>Files</span></a></li> |
---|
| 17 | </ul> |
---|
| 18 | </div> |
---|
| 19 | <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 |
---|
| 20 | <a name="l00013"></a>00013 <span class="preprocessor">#ifndef DS_UI_H</span> |
---|
| 21 | <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#define DS_UI_H</span> |
---|
| 22 | <a name="l00015"></a>00015 <span class="preprocessor"></span> |
---|
| 23 | <a name="l00016"></a>00016 |
---|
| 24 | <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="libDS_8h.html" title="Common DataSources.">libDS.h</a>"</span> |
---|
| 25 | <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> |
---|
| 26 | <a name="l00019"></a>00019 |
---|
[269] | 27 | <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> { |
---|
| 28 | <a name="l00052"></a>00052 <span class="keyword">public</span>: |
---|
| 29 | <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> ) {}; |
---|
| 30 | <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>{ |
---|
| 31 | <a name="l00055"></a>00055 <span class="keywordtype">int</span> ych = S[<span class="stringliteral">"ychns"</span>]; |
---|
| 32 | <a name="l00056"></a>00056 <span class="keywordtype">int</span> uch = S[<span class="stringliteral">"uchns"</span>]; |
---|
| 33 | <a name="l00057"></a>00057 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> yrv; |
---|
| 34 | <a name="l00058"></a>00058 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> urv; |
---|
| 35 | <a name="l00059"></a>00059 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> rrv; |
---|
| 36 | <a name="l00060"></a>00060 <span class="keywordtype">int</span> i,j; |
---|
| 37 | <a name="l00061"></a>00061 <span class="keywordflow">for</span> ( i=0;i<ych; i++ ) {yrv.<a class="code" href="classbdm_1_1RV.html#87841b5ee43997b79789c0c22047e224" title="Add (concat) another variable to the current one,.">add</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> ( <span class="stringliteral">"y"</span>+num2str(i),i+1 ));} |
---|
| 38 | <a name="l00062"></a>00062 <span class="keywordflow">for</span> ( j=0;j<uch; j++ ) {urv.<a class="code" href="classbdm_1_1RV.html#87841b5ee43997b79789c0c22047e224" title="Add (concat) another variable to the current one,.">add</a> ( <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> ( <span class="stringliteral">"u"</span>+num2str(i),j+i+1 ));} |
---|
| 39 | <a name="l00063"></a>00063 |
---|
| 40 | <a name="l00064"></a>00064 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> drv=<a class="code" href="namespacebdm.html#b9016687c0e874ca5cdcf75ae28811aa" title="Concat two random variables.">concat</a> ( yrv,urv ); |
---|
| 41 | <a name="l00065"></a>00065 <span class="comment">//build regressor</span> |
---|
| 42 | <a name="l00066"></a>00066 Setting& ids=S[<span class="stringliteral">"ids"</span>]; |
---|
| 43 | <a name="l00067"></a>00067 Setting& del=S[<span class="stringliteral">"delays"</span>]; |
---|
| 44 | <a name="l00068"></a>00068 |
---|
| 45 | <a name="l00069"></a>00069 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<ids.getLength(); i++ ) { |
---|
| 46 | <a name="l00070"></a>00070 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a> tmp=drv.<a class="code" href="classbdm_1_1RV.html#c0c04ab99ded62e1e05bcefb151ebeb9" title="Select only variables at indeces ind.">subselect</a> ( vec_1 ( <span class="keywordtype">int</span> ( ids[i] )-1 ) ); |
---|
| 47 | <a name="l00071"></a>00071 tmp.<a class="code" href="classbdm_1_1RV.html#bd77cb0899f7fba1d0e34396137b7f1f" title="Shift time shifted by delta.">t</a> ( <span class="keywordtype">int</span> ( del[i] ) ); |
---|
| 48 | <a name="l00072"></a>00072 rrv.<a class="code" href="classbdm_1_1RV.html#87841b5ee43997b79789c0c22047e224" title="Add (concat) another variable to the current one,.">add</a> ( tmp ); |
---|
| 49 | <a name="l00073"></a>00073 } |
---|
| 50 | <a name="l00074"></a>00074 |
---|
| 51 | <a name="l00075"></a>00075 ARXDS* tmp = <span class="keyword">new</span> ARXDS ( yrv, urv, rrv ); |
---|
[270] | 52 | <a name="l00076"></a>00076 mat Th=getmat ( S[<span class="stringliteral">"theta"</span>],rrv.count() ); |
---|
[269] | 53 | <a name="l00077"></a>00077 vec mu0; |
---|
| 54 | <a name="l00078"></a>00078 <span class="keywordflow">if</span> ( S.exists ( <span class="stringliteral">"offset"</span> ) ) { |
---|
| 55 | <a name="l00079"></a>00079 mu0=getvec ( S[<span class="stringliteral">"offset"</span>] ); |
---|
| 56 | <a name="l00080"></a>00080 } |
---|
| 57 | <a name="l00081"></a>00081 <span class="keywordflow">else</span> { |
---|
[270] | 58 | <a name="l00082"></a>00082 mu0=zeros ( yrv.count() ); |
---|
[269] | 59 | <a name="l00083"></a>00083 } |
---|
[270] | 60 | <a name="l00084"></a>00084 <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.count() ) ); |
---|
[269] | 61 | <a name="l00085"></a>00085 tmp->set_parameters ( Th,mu0,sqR ); |
---|
| 62 | <a name="l00086"></a>00086 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"opt"</span>)){tmp->set_options(S[<span class="stringliteral">"opt"</span>]);} |
---|
| 63 | <a name="l00087"></a>00087 <span class="keywordflow">return</span> tmp; |
---|
| 64 | <a name="l00088"></a>00088 }; |
---|
| 65 | <a name="l00089"></a>00089 }; |
---|
| 66 | <a name="l00090"></a>00090 |
---|
| 67 | <a name="l00091"></a>00091 UIREGISTER ( <a class="code" href="classUIArxDS.html">UIArxDS</a> ); |
---|
| 68 | <a name="l00092"></a>00092 |
---|
[270] | 69 | <a name="l00123"></a>00123 <span class="keyword">class </span>UIstateDS : <span class="keyword">public</span> <a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> { |
---|
[269] | 70 | <a name="l00124"></a>00124 <span class="keyword">public</span>: |
---|
| 71 | <a name="l00125"></a>00125 UIstateDS() :<a class="code" href="classbdm_1_1UIbuilder.html" title="Builds computational object from a UserInfo structure.">UIbuilder</a> ( <span class="stringliteral">"stateDS"</span> ) {}; |
---|
| 72 | <a name="l00126"></a>00126 <a class="code" href="classbdm_1_1bdmroot.html" title="Root class of BDM objects.">bdmroot</a>* <a class="code" href="classbdm_1_1UIbuilder.html#193cede6302669ff48dfd8ab3b7e31f8" title="Function building the computational object.">build</a> ( Setting &S )<span class="keyword"> const </span>{ |
---|
[270] | 73 | <a name="l00127"></a>00127 <a class="code" href="classbdm_1_1RV.html" title="Class representing variables, most often random variables.">RV</a>* rvtmp; |
---|
| 74 | <a name="l00128"></a>00128 <a class="code" href="namespacebdm.html#b547b14af614cba1ab6c8942dde34462" title="Prototype of a UI builder. Return value is by the second argument since it type checking...">UIbuild</a>(S[<span class="stringliteral">"IM"</span>][<span class="stringliteral">"rvu"</span>], rvtmp); |
---|
| 75 | <a name="l00129"></a>00129 <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* IM; |
---|
| 76 | <a name="l00130"></a>00130 <a class="code" href="namespacebdm.html#b547b14af614cba1ab6c8942dde34462" title="Prototype of a UI builder. Return value is by the second argument since it type checking...">UIbuild</a>(S[<span class="stringliteral">"IM"</span>],IM); |
---|
| 77 | <a name="l00131"></a>00131 <a class="code" href="classbdm_1_1mpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a>* OM; |
---|
| 78 | <a name="l00132"></a>00132 <a class="code" href="namespacebdm.html#b547b14af614cba1ab6c8942dde34462" title="Prototype of a UI builder. Return value is by the second argument since it type checking...">UIbuild</a>(S[<span class="stringliteral">"OM"</span>],OM); |
---|
| 79 | <a name="l00133"></a>00133 <span class="keywordflow">return</span> <span class="keyword">new</span> stateDS(IM,OM,*rvtmp); |
---|
| 80 | <a name="l00134"></a>00134 } |
---|
| 81 | <a name="l00135"></a>00135 }; |
---|
| 82 | <a name="l00136"></a>00136 UIREGISTER ( UIstateDS ); |
---|
| 83 | <a name="l00137"></a>00137 <span class="preprocessor">#endif // DS_UI_H</span> |
---|
[264] | 84 | </pre></div></div> |
---|
[270] | 85 | <hr size="1"><address style="text-align: right;"><small>Generated on Wed Feb 11 23:33:55 2009 for mixpp by |
---|
[264] | 86 | <a href="http://www.doxygen.org/index.html"> |
---|
| 87 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address> |
---|
| 88 | </body> |
---|
| 89 | </html> |
---|