84 | | <a name="l00032"></a>00032 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"mu0"</span>)){mu0=getvec(S[<span class="stringliteral">"mu0"</span>]);}<span class="keywordflow">else</span>{mu0=zeros(dim);}; |
85 | | <a name="l00033"></a>00033 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"P0"</span>)){mu0=getmat(S[<span class="stringliteral">"P0"</span>],dim);}<span class="keywordflow">else</span>{P0=eye(dim);}; |
86 | | <a name="l00034"></a>00034 E->set_statistics(mu0,P0); |
87 | | <a name="l00035"></a>00035 |
88 | | <a name="l00036"></a>00036 <span class="comment">//connect</span> |
89 | | <a name="l00037"></a>00037 RV* drv; UIbuild(S[<span class="stringliteral">"drv"</span>],drv); |
90 | | <a name="l00038"></a>00038 E->set_drv(*drv); |
91 | | <a name="l00039"></a>00039 RV* rv; UIbuild(S[<span class="stringliteral">"rv"</span>],rv); |
92 | | <a name="l00040"></a>00040 E->set_rv(*rv); |
93 | | <a name="l00041"></a>00041 <span class="keywordflow">return</span> E; |
94 | | <a name="l00042"></a>00042 } |
95 | | <a name="l00043"></a>00043 }; |
96 | | <a name="l00044"></a>00044 UIREGISTER ( UIEKF ); |
97 | | <a name="l00045"></a>00045 |
98 | | <a name="l00046"></a>00046 |
| 84 | <a name="l00032"></a>00032 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"mu0"</span>)){mu0=getvec(S[<span class="stringliteral">"mu0"</span>]);}<span class="keywordflow">else</span>{mu0=<a class="code" href="group__specmat.html#g10723ecada06221cbe64fe2736a59de1" title="A Double (rows,cols)-matrix of zeros.">zeros</a>(dim);}; |
| 85 | <a name="l00033"></a>00033 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"P0"</span>)){P0=getmat(S[<span class="stringliteral">"P0"</span>],dim);}<span class="keywordflow">else</span>{P0=<a class="code" href="group__specmat.html#gbfc73e72a56769280cd9fda812367196" title="A non-copying version of the eye function.">eye</a>(dim);}; |
| 86 | <a name="l00034"></a>00034 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"dP0"</span>)){P0=<a class="code" href="group__diag.html#gb0938c932c1cbc19b2ce6c5ac1007553" title="Get the diagonal elements of the input matrix m.">diag</a>(getvec(S[<span class="stringliteral">"dP0"</span>]));}<span class="keywordflow">else</span>{P0=<a class="code" href="group__specmat.html#gbfc73e72a56769280cd9fda812367196" title="A non-copying version of the eye function.">eye</a>(dim);}; |
| 87 | <a name="l00035"></a>00035 E->set_statistics(mu0,P0); |
| 88 | <a name="l00036"></a>00036 |
| 89 | <a name="l00037"></a>00037 <span class="comment">//parameters</span> |
| 90 | <a name="l00038"></a>00038 E->set_parameters(IM, OM, <a class="code" href="group__diag.html#gb0938c932c1cbc19b2ce6c5ac1007553" title="Get the diagonal elements of the input matrix m.">diag</a>(getvec(S[<span class="stringliteral">"dQ"</span>])), <a class="code" href="group__diag.html#gb0938c932c1cbc19b2ce6c5ac1007553" title="Get the diagonal elements of the input matrix m.">diag</a>(getvec(S[<span class="stringliteral">"dR"</span>]))); |
| 91 | <a name="l00039"></a>00039 |
| 92 | <a name="l00040"></a>00040 <span class="comment">//connect</span> |
| 93 | <a name="l00041"></a>00041 RV* drv; UIbuild(S[<span class="stringliteral">"drv"</span>],drv); |
| 94 | <a name="l00042"></a>00042 E->set_drv(*drv); |
| 95 | <a name="l00043"></a>00043 RV* rv; UIbuild(S[<span class="stringliteral">"rv"</span>],rv); |
| 96 | <a name="l00044"></a>00044 E->set_rv(*rv); |
| 97 | <a name="l00045"></a>00045 |
| 98 | <a name="l00046"></a>00046 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"options"</span>)){E->set_options(S[<span class="stringliteral">"options"</span>]);}; |
| 99 | <a name="l00047"></a>00047 |
| 100 | <a name="l00048"></a>00048 <span class="keywordflow">return</span> E; |
| 101 | <a name="l00049"></a>00049 } |
| 102 | <a name="l00050"></a>00050 }; |
| 103 | <a name="l00051"></a>00051 UIREGISTER ( UIEKF ); |
| 104 | <a name="l00052"></a>00052 |
| 105 | <a name="l00053"></a>00053 <span class="keyword">class </span>UIMultiModel: <span class="keyword">public</span> UIbuilder { |
| 106 | <a name="l00054"></a>00054 <span class="keyword">public</span>: |
| 107 | <a name="l00055"></a>00055 UIMultiModel():UIbuilder(<span class="stringliteral">"MultiModel"</span>){}; |
| 108 | <a name="l00056"></a>00056 bdmroot* build ( Setting &S )<span class="keyword"> const </span>{ |
| 109 | <a name="l00057"></a>00057 <a class="code" href="classitpp_1_1Array.html">Array<EKFCh*></a> A; |
| 110 | <a name="l00058"></a>00058 MultiModel* MM; MM=<span class="keyword">new</span> MultiModel; |
| 111 | <a name="l00059"></a>00059 |
| 112 | <a name="l00060"></a>00060 Setting& <a class="code" href="group__miscfunc.html#g441f466a2b056fe5f2b05fcd894c472f" title="Calculates the modulus, i.e. the signed reminder after division.">mod</a>=S[<span class="stringliteral">"models"</span>]; |
| 113 | <a name="l00061"></a>00061 A.<a class="code" href="classitpp_1_1Array.html#3709407656d26aae2c5d3e844316d4e0" title="Resizing an Array&lt;T&gt;.">set_length</a>(mod.getLength()); |
| 114 | <a name="l00062"></a>00062 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<A.<a class="code" href="classitpp_1_1Array.html#53629018f146084de506c33c69fa19a3" title="Returns the number of data elements in the array object.">length</a>();i++){ |
| 115 | <a name="l00063"></a>00063 UIbuild(mod[i], A(i)); |
| 116 | <a name="l00064"></a>00064 } |
| 117 | <a name="l00065"></a>00065 |
| 118 | <a name="l00066"></a>00066 MM->set_parameters(A); |
| 119 | <a name="l00067"></a>00067 MM->set_drv(A(0)->_drv()); |
| 120 | <a name="l00068"></a>00068 <span class="comment">//MM->set_rv(A(0)->_rv());</span> |
| 121 | <a name="l00069"></a>00069 |
| 122 | <a name="l00070"></a>00070 <span class="keywordflow">if</span> (S.exists(<span class="stringliteral">"options"</span>)){MM->set_options(S[<span class="stringliteral">"options"</span>]);}; |
| 123 | <a name="l00071"></a>00071 |
| 124 | <a name="l00072"></a>00072 <span class="keywordflow">return</span> MM; |
| 125 | <a name="l00073"></a>00073 } |
| 126 | <a name="l00074"></a>00074 }; |
| 127 | <a name="l00075"></a>00075 UIREGISTER ( UIMultiModel ); |
| 128 | <a name="l00076"></a>00076 |