Changeset 32
- Timestamp:
- 03/03/08 13:00:32 (17 years ago)
- Files:
-
- 91 added
- 178 modified
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified BDM.kdevelop ¶
r28 r32 5 5 <projectdirectory>/home/smidl/work/mixpp</projectdirectory> 6 6 <absoluteprojectpath>true</absoluteprojectpath> 7 <author />8 <email />7 <author></author> 8 <email></email> 9 9 <version>$VERSION$</version> 10 10 <primarylanguage>C++</primarylanguage> … … 14 14 </secondaryLanguages> 15 15 <projectname>BDM</projectname> 16 <description />17 <defaultencoding />16 <description></description> 17 <defaultencoding></defaultencoding> 18 18 <versioncontrol>kdevsubversion</versioncontrol> 19 19 </general> … … 21 21 <filelistdirectory>/home/smidl/work/mixpp</filelistdirectory> 22 22 <run> 23 <mainprogram>/home/smidl/work/mixpp/tests/testKF </mainprogram>23 <mainprogram>/home/smidl/work/mixpp/tests/testKF_QR</mainprogram> 24 24 <directoryradio>custom</directoryradio> 25 25 <customdirectory>/home/smidl/work/mixpp</customdirectory> 26 <programargs />26 <programargs></programargs> 27 27 <terminal>false</terminal> 28 28 <autocompile>true</autocompile> 29 29 <envvars/> 30 <globaldebugarguments />30 <globaldebugarguments></globaldebugarguments> 31 31 <globalcwd>/home/smidl/work/mixpp</globalcwd> 32 32 <useglobalprogram>false</useglobalprogram> … … 42 42 <numberofjobs>0</numberofjobs> 43 43 <dontact>false</dontact> 44 <makebin />44 <makebin></makebin> 45 45 <selectedenvironment>default</selectedenvironment> 46 46 <environments> … … 48 48 </environments> 49 49 <prio>0</prio> 50 <defaulttarget />51 <makeoptions />50 <defaulttarget></defaulttarget> 51 <makeoptions></makeoptions> 52 52 </make> 53 53 <filetypes> … … 70 70 <other> 71 71 <prio>0</prio> 72 <otherbin />73 <defaulttarget />74 <otheroptions />72 <otherbin></otherbin> 73 <defaulttarget></defaulttarget> 74 <otheroptions></otheroptions> 75 75 <selectedenvironment>default</selectedenvironment> 76 76 <environments> … … 144 144 </qt> 145 145 <creategettersetter> 146 <prefixGet />146 <prefixGet></prefixGet> 147 147 <prefixSet>set</prefixSet> 148 148 <prefixVariable>m_,_</prefixVariable> … … 177 177 <projectdirectory>/home/smidl/work/mixpp</projectdirectory> 178 178 <absoluteprojectpath>true</absoluteprojectpath> 179 <gdbpath />180 <dbgshell />181 <configGdbScript />182 <runShellScript />183 <runGdbScript />179 <gdbpath></gdbpath> 180 <dbgshell></dbgshell> 181 <configGdbScript></configGdbScript> 182 <runShellScript></runShellScript> 183 <runGdbScript></runGdbScript> 184 184 <breakonloadinglibs>true</breakonloadinglibs> 185 185 <separatetty>false</separatetty> -
TabularUnified BDM.kdevelop.filelist ¶
r28 r32 1 1 CMakeLists.txt 2 bdm 2 3 bdm/CMakeLists.txt 4 bdm/estim 3 5 bdm/estim/libKF.cpp 4 6 bdm/estim/libKF.h … … 19 21 tests/CMakeLists.txt 20 22 tests/test0.cpp 23 tests/testEpdf.cpp 21 24 tests/testKF.cpp 25 tests/testKF_QR.cpp 22 26 tests/testPF.cpp 27 tests/testResample.cpp 23 28 tests/testSmp.cpp -
TabularUnified bdm/estim/libKF.cpp ¶
r28 r32 6 6 using std::endl; 7 7 8 KalmanFull::KalmanFull ( mat A0, mat B0, mat C0, mat D0, mat R0, mat Q0, mat P0, vec mu0 ) {8 KalmanFull::KalmanFull ( mat A0, mat B0, mat C0, mat D0, mat R0, mat Q0, mat P0, vec mu0 ) { 9 9 dimx = A0.rows(); 10 10 dimu = B0.cols(); 11 11 dimy = C0.rows(); 12 12 13 it_assert_debug ( A0.cols()==dimx, "KalmanFull: A is not square" );14 it_assert_debug ( B0.rows()==dimx, "KalmanFull: B is not compatible" );15 it_assert_debug ( C0.cols()==dimx, "KalmanFull: C is not square" );16 it_assert_debug (( D0.rows()==dimy ) || ( D0.cols()==dimu ), "KalmanFull: D is not compatible" );17 it_assert_debug (( R0.cols()==dimy ) || ( R0.rows()==dimy ), "KalmanFull: R is not compatible" );18 it_assert_debug (( Q0.cols()==dimx ) || ( Q0.rows()==dimx ), "KalmanFull: Q is not compatible" );13 it_assert_debug ( A0.cols() ==dimx, "KalmanFull: A is not square" ); 14 it_assert_debug ( B0.rows() ==dimx, "KalmanFull: B is not compatible" ); 15 it_assert_debug ( C0.cols() ==dimx, "KalmanFull: C is not square" ); 16 it_assert_debug ( ( D0.rows() ==dimy ) || ( D0.cols() ==dimu ), "KalmanFull: D is not compatible" ); 17 it_assert_debug ( ( R0.cols() ==dimy ) || ( R0.rows() ==dimy ), "KalmanFull: R is not compatible" ); 18 it_assert_debug ( ( Q0.cols() ==dimx ) || ( Q0.rows() ==dimx ), "KalmanFull: Q is not compatible" ); 19 19 20 20 A = A0; … … 28 28 } 29 29 30 void KalmanFull::bayes ( const vec &dt) {31 it_assert_debug ( dt.length()==( dimy+dimu ),"KalmanFull::bayes wrong size of dt" );30 void KalmanFull::bayes ( const vec &dt ) { 31 it_assert_debug ( dt.length() == ( dimy+dimu ),"KalmanFull::bayes wrong size of dt" ); 32 32 33 vec u = dt.get ( dimy,dimy+dimu-1 );34 vec y = dt.get ( 0,dimy-1 );33 vec u = dt.get ( dimy,dimy+dimu-1 ); 34 vec y = dt.get ( 0,dimy-1 ); 35 35 //Time update 36 36 mu = A*mu + B*u; … … 39 39 //Data update 40 40 _Ry = C*P*C.transpose() + R; 41 _iRy = inv ( _Ry );42 _K = P*C.transpose() *_iRy;41 _iRy = inv ( _Ry ); 42 _K = P*C.transpose() *_iRy; 43 43 P -= _K*C*P; // P = P -KCP; 44 mu += _K* ( y-C*mu-D*u );44 mu += _K* ( y-C*mu-D*u ); 45 45 }; 46 46 … … 50 50 } 51 51 52 void KFcondQR::condition ( const vec &QR ) { 53 it_assert_debug ( QR.length() == ( rvc.count() ),"KFcondRQ: conditioning by incompatible vector" ); 54 55 Q.setD ( QR ( 0, dimx-1 )); 56 R.setD ( QR ( dimx, -1 )); 57 }; 58 59 void KFcondR::condition ( const vec &R0 ) { 60 it_assert_debug ( R0.length() == ( rvc.count() ),"KFcondR: conditioning by incompatible vector" ); 61 62 R.setD ( R0 ); 63 }; -
TabularUnified bdm/estim/libKF.h ¶
r28 r32 24 24 * \brief Basic Kalman filter with full matrices (education purpose only)! Will be deleted soon! 25 25 */ 26 class KalmanFull : public BM { 26 27 class KalmanFull { 27 28 int dimx, dimy, dimu; 28 29 mat A, B, C, D, R, Q; 29 30 //cache 30 31 //cache 31 32 mat _Pp, _Ry, _iRy, _K; 32 33 public: 33 //posterior 34 //posterior 34 35 //! Mean value of the posterior density 35 36 vec mu; … … 38 39 39 40 public: 40 //! Full constructor 41 KalmanFull ( mat A, mat B, mat C, mat D, mat R, mat Q, mat P0, vec mu0 );41 //! Full constructor 42 KalmanFull ( mat A, mat B, mat C, mat D, mat R, mat Q, mat P0, vec mu0 ); 42 43 //! Here dt = [yt;ut] of appropriate dimensions 43 void bayes(const vec &dt); 44 epdf* _epdf(){return NULL;}; 44 void bayes ( const vec &dt ); 45 45 46 46 friend std::ostream &operator<< ( std::ostream &os, const KalmanFull &kf ); … … 53 53 */ 54 54 template<class sq_T> 55 class Kalman : public BM { 55 56 class Kalman : public BM { 56 57 protected: 58 RV rvy; 59 RV rvu; 57 60 int dimx, dimy, dimu; 58 61 mat A, B, C, D; 59 sq_T R, Q;60 61 //!posterior on $x_t$62 sq_T Q,R; 63 64 //!posterior density on $x_t$ 62 65 enorm<sq_T> est; 63 66 //!preditive density on $y_t$ 64 67 enorm<sq_T> fy; 65 68 66 69 mat _K; 67 70 //cache of fy 68 vec* _yp; 71 vec* _yp; 69 72 sq_T* _Ry,*_iRy; 70 73 //cache of est 71 74 vec* _mu; 72 75 sq_T* _P, *_iP; 73 76 74 77 public: 75 78 //! Default constructor 76 Kalman (RV rvx0, RV rvy0, RV rvu0); 77 //! Set parameters with check of relevance 78 void set_parameters (const mat &A0,const mat &B0,const mat &C0,const mat &D0,const sq_T &R0,const sq_T &Q0); 79 Kalman ( RV rvx0, RV rvy0, RV rvu0 ); 80 //! Copy constructor 81 Kalman ( const Kalman<sq_T> &K0 ); 82 //! Set parameters with check of relevance 83 void set_parameters ( const mat &A0,const mat &B0,const mat &C0,const mat &D0,const sq_T &R0,const sq_T &Q0 ); 79 84 //! Set estimate values, used e.g. in initialization. 80 void set_est(const vec &mu0, const sq_T &P0 ){est.set_parameters(mu0,P0);}; 85 86 void set_est ( const vec &mu0, const sq_T &P0 ) { 87 sq_T pom(dimy); 88 est.set_parameters ( mu0,P0 ); 89 P0.mult_sym(C,pom); 90 fy.set_parameters ( C*mu0, pom ); 91 }; 92 81 93 //! Here dt = [yt;ut] of appropriate dimensions 82 void bayes(const vec &dt); 94 void bayes ( const vec &dt ); 95 epdf& _epdf() {return est;} 83 96 84 97 // friend std::ostream &operator<< ( std::ostream &os, const Kalman<sq_T> &kf ); 85 98 86 99 //!access functions 87 enorm<sq_T>* _epdf(){return &est;} 88 }; 89 90 /*! 91 \brief Extended Kalman Filter 100 }; 101 102 /*! 103 \brief Extended Kalman Filter 92 104 93 105 An approximation of the exact Bayesian filter with Gaussian noices and non-linear evolutions of their mean. 94 106 */ 95 107 template<class sq_T> 108 96 109 class EKF : public Kalman<ldmat> { 97 110 //! Internal Model f(x,u) … … 99 112 //! Observation Model h(x,u) 100 113 diffbifn* phxu; 101 public: 114 public: 102 115 //! Default constructor 103 EKF ( RV rvx, RV rvy, RV rvu);104 void set_parameters (diffbifn* pfxu, diffbifn* phxu, const sq_T Q0, const sq_T R0);116 EKF ( RV rvx, RV rvy, RV rvu ); 117 void set_parameters ( diffbifn* pfxu, diffbifn* phxu, const sq_T Q0, const sq_T R0 ); 105 118 //! Here dt = [yt;ut] of appropriate dimensions 106 void bayes(const vec &dt); 119 void bayes ( const vec &dt ); 120 }; 121 122 /*! 123 \brief Kalman Filter with conditional diagonal matrices R and Q. 124 */ 125 126 class KFcondQR : public Kalman<ldmat>, public BMcond { 127 //protected: 128 public: 129 KFcondQR ( RV rvx, RV rvy, RV rvu, RV rvRQ ) : Kalman<ldmat> ( rvx, rvy,rvu ),BMcond ( rvRQ ) {}; 130 131 void condition ( const vec &RQ ); 132 }; 133 134 /*! 135 \brief Kalman Filter with conditional diagonal matrices R and Q. 136 */ 137 138 class KFcondR : public Kalman<ldmat>, public BMcond { 139 //protected: 140 public: 141 KFcondR ( RV rvx, RV rvy, RV rvu, RV rvR ) : Kalman<ldmat> ( rvx, rvy,rvu ),BMcond ( rvR ) {}; 142 143 void condition ( const vec &R ); 107 144 }; 108 145 … … 110 147 111 148 template<class sq_T> 112 Kalman<sq_T>::Kalman(RV rvx, RV rvy, RV rvu): BM(), 113 dimx(rvx.count()), dimy(rvy.count()),dimu(rvu.count()), 114 A(dimx,dimx), B(dimx,dimu), C(dimy,dimx), D(dimy,dimu), est(rvx), fy(rvy){ 149 Kalman<sq_T>::Kalman ( const Kalman<sq_T> &K0 ) : BM ( K0.rv ),rvy ( K0.rvy ),rvu ( K0.rvu ), 150 dimx ( rv.count() ), dimy ( rvy.count() ),dimu ( rvu.count() ), 151 A ( dimx,dimx ), B ( dimx,dimu ), C ( dimy,dimx ), D ( dimy,dimu ),est ( rv ), fy ( rvy ) { 152 153 this->set_parameters ( K0.A, K0.B, K0.C, K0.D, K0.R, K0.Q ); 154 155 //establish pointers 156 _mu = est._mu(); 157 est._R ( _P,_iP ); 158 159 //fy 160 _yp = fy._mu(); 161 fy._R ( _Ry,_iRy ); 162 163 //reset copy values in pointers 164 *_mu = *K0._mu; 165 *_P = *K0._P; 166 *_iP = *K0._iP; 167 *_yp = *K0._yp; 168 *_iRy = *K0._iRy; 169 *_Ry = *K0._Ry; 170 171 } 172 173 template<class sq_T> 174 Kalman<sq_T>::Kalman ( RV rvx, RV rvy0, RV rvu0 ) : BM ( rvx ),rvy ( rvy0 ),rvu ( rvu0 ), 175 dimx ( rvx.count() ), dimy ( rvy.count() ),dimu ( rvu.count() ), 176 A ( dimx,dimx ), B ( dimx,dimu ), C ( dimy,dimx ), D ( dimy,dimu ), 177 Q(dimx), R (dimy), 178 est ( rvx ), fy ( rvy ) { 115 179 //assign cache 116 180 //est 117 _mu = est._mu();118 est._R(_P,_iP);181 _mu = est._mu(); 182 est._R ( _P,_iP ); 119 183 120 184 //fy 121 _yp = fy._mu();122 fy._R(_Ry,_iRy);123 }; 124 125 template<class sq_T> 126 void Kalman<sq_T>::set_parameters (const mat &A0,const mat &B0, const mat &C0, const mat &D0, const sq_T &R0, const sq_T &Q0) {127 it_assert_debug ( A0.cols()==dimx, "Kalman: A is not square" );128 it_assert_debug ( B0.rows()==dimx, "Kalman: B is not compatible" );129 it_assert_debug ( C0.cols()==dimx, "Kalman: C is not square" );130 it_assert_debug (( D0.rows()==dimy ) || ( D0.cols()==dimu ), "Kalman: D is not compatible" );131 it_assert_debug (( R0.cols()==dimy ) || ( R0.rows()==dimy ), "Kalman: R is not compatible" );132 it_assert_debug (( Q0.cols()==dimx ) || ( Q0.rows()==dimx ), "Kalman: Q is not compatible" );185 _yp = fy._mu(); 186 fy._R ( _Ry,_iRy ); 187 }; 188 189 template<class sq_T> 190 void Kalman<sq_T>::set_parameters ( const mat &A0,const mat &B0, const mat &C0, const mat &D0, const sq_T &R0, const sq_T &Q0 ) { 191 it_assert_debug ( A0.cols() ==dimx, "Kalman: A is not square" ); 192 it_assert_debug ( B0.rows() ==dimx, "Kalman: B is not compatible" ); 193 it_assert_debug ( C0.cols() ==dimx, "Kalman: C is not square" ); 194 it_assert_debug ( ( D0.rows() ==dimy ) || ( D0.cols() ==dimu ), "Kalman: D is not compatible" ); 195 it_assert_debug ( ( R0.cols() ==dimy ) || ( R0.rows() ==dimy ), "Kalman: R is not compatible" ); 196 it_assert_debug ( ( Q0.cols() ==dimx ) || ( Q0.rows() ==dimx ), "Kalman: Q is not compatible" ); 133 197 134 198 A = A0; … … 137 201 D = D0; 138 202 R = R0; 139 Q = Q0; 203 Q = Q0; 140 204 } 141 205 142 206 template<class sq_T> 143 void Kalman<sq_T>::bayes ( const vec &dt) {144 it_assert_debug ( dt.length()==( dimy+dimu ),"KalmanFull::bayes wrong size of dt" );145 146 vec u = dt.get ( dimy,dimy+dimu-1 );147 vec y = dt.get ( 0,dimy-1 );207 void Kalman<sq_T>::bayes ( const vec &dt ) { 208 it_assert_debug ( dt.length() == ( dimy+dimu ),"KalmanFull::bayes wrong size of dt" ); 209 210 vec u = dt.get ( dimy,dimy+dimu-1 ); 211 vec y = dt.get ( 0,dimy-1 ); 148 212 //Time update 149 *_mu = A* (*_mu) + B*u;213 *_mu = A* ( *_mu ) + B*u; 150 214 //P = A*P*A.transpose() + Q; in sq_T 151 _P->mult_sym ( A );152 ( *_P)+=Q;215 _P->mult_sym ( A ); 216 ( *_P ) +=Q; 153 217 154 218 //Data update 155 219 //_Ry = C*P*C.transpose() + R; in sq_T 156 _P->mult_sym ( C, *_Ry);157 ( *_Ry)+=R;220 _P->mult_sym ( C, *_Ry ); 221 ( *_Ry ) +=R; 158 222 159 223 mat Pfull = _P->to_mat(); 160 161 _Ry->inv( *_iRy ); // result is in _iRy; 162 _K = Pfull*C.transpose()*(_iRy->to_mat()); 163 164 sq_T pom((int)Pfull.rows()); 165 _iRy->mult_sym_t(C*Pfull,pom); 166 (*_P) -= pom; // P = P -PC'iRy*CP; 167 (*_yp) = C*(*_mu)+D*u; //y prediction 168 (*_mu) += _K*( y-(*_yp) ); 169 170 if (evalll==true) { 171 ll+=fy.evalpdflog(*_yp); 224 225 _Ry->inv ( *_iRy ); // result is in _iRy; 226 fy._cached ( true ); 227 _K = Pfull*C.transpose() * ( _iRy->to_mat() ); 228 229 sq_T pom ( ( int ) Pfull.rows() ); 230 _iRy->mult_sym_t ( C*Pfull,pom ); 231 ( *_P ) -= pom; // P = P -PC'iRy*CP; 232 ( *_yp ) = C* ( *_mu ) +D*u; //y prediction 233 ( *_mu ) += _K* ( y- ( *_yp ) ); 234 235 236 if ( evalll==true ) { //likelihood of observation y 237 ll=fy.evalpdflog ( y ); 172 238 } 239 240 //cout << "y: " << y-(*_yp) <<" R: " << _Ry->to_mat() << " iR: " << _iRy->to_mat() << " ll: " << ll <<endl; 241 173 242 }; 174 243 … … 176 245 177 246 template<class sq_T> 178 EKF<sq_T>::EKF (RV rvx0, RV rvy0, RV rvu0): Kalman<ldmat>(rvx0,rvy0,rvu0){}179 180 template<class sq_T> 181 void EKF<sq_T>::set_parameters (diffbifn* pfxu0, diffbifn* phxu0,const sq_T Q0,const sq_T R0) {182 183 184 185 186 pfxu->dfdx_cond(*_mu,zeros(dimu),A,true);187 pfxu->dfdu_cond(*_mu,zeros(dimu),B,true);188 phxu->dfdx_cond(*_mu,zeros(dimu),C,true);189 phxu->dfdu_cond(*_mu,zeros(dimu),D,true);190 191 192 247 EKF<sq_T>::EKF ( RV rvx0, RV rvy0, RV rvu0 ) : Kalman<ldmat> ( rvx0,rvy0,rvu0 ) {} 248 249 template<class sq_T> 250 void EKF<sq_T>::set_parameters ( diffbifn* pfxu0, diffbifn* phxu0,const sq_T Q0,const sq_T R0 ) { 251 pfxu = pfxu0; 252 phxu = phxu0; 253 254 //initialize matrices A C, later, these will be only updated! 255 pfxu->dfdx_cond ( *_mu,zeros ( dimu ),A,true ); 256 pfxu->dfdu_cond ( *_mu,zeros ( dimu ),B,true ); 257 phxu->dfdx_cond ( *_mu,zeros ( dimu ),C,true ); 258 phxu->dfdu_cond ( *_mu,zeros ( dimu ),D,true ); 259 260 R = R0; 261 Q = Q0; 193 262 194 263 using std::cout; … … 201 270 202 271 template<class sq_T> 203 void EKF<sq_T>::bayes ( const vec &dt) {204 it_assert_debug ( dt.length()==( dimy+dimu ),"KalmanFull::bayes wrong size of dt" );205 206 vec u = dt.get ( dimy,dimy+dimu-1 );207 vec y = dt.get ( 0,dimy-1 );272 void EKF<sq_T>::bayes ( const vec &dt ) { 273 it_assert_debug ( dt.length() == ( dimy+dimu ),"KalmanFull::bayes wrong size of dt" ); 274 275 vec u = dt.get ( dimy,dimy+dimu-1 ); 276 vec y = dt.get ( 0,dimy-1 ); 208 277 //Time update 209 *_mu = pfxu->eval (*_mu, u);210 pfxu->dfdx_cond (*_mu,u,A,false); //update A by a derivative of fx211 278 *_mu = pfxu->eval ( *_mu, u ); 279 pfxu->dfdx_cond ( *_mu,u,A,false ); //update A by a derivative of fx 280 212 281 //P = A*P*A.transpose() + Q; in sq_T 213 _P->mult_sym ( A );214 ( *_P)+=Q;282 _P->mult_sym ( A ); 283 ( *_P ) +=Q; 215 284 216 285 //Data update 217 phxu->dfdx_cond (*_mu,u,C,false); //update C by a derivative hx286 phxu->dfdx_cond ( *_mu,u,C,false ); //update C by a derivative hx 218 287 //_Ry = C*P*C.transpose() + R; in sq_T 219 _P->mult_sym ( C, *_Ry);220 ( *_Ry)+=R;288 _P->mult_sym ( C, *_Ry ); 289 ( *_Ry ) +=R; 221 290 222 291 mat Pfull = _P->to_mat(); 223 224 _Ry->inv( *_iRy ); // result is in _iRy; 225 _K = Pfull*C.transpose()*(_iRy->to_mat()); 226 (*_P) -= _K*C*Pfull; // P = P -KCP; 227 *_yp = phxu->eval(*_mu,u); //y prediction 228 (*_mu) += _K*( y-*_yp ); 229 230 if (evalll==true) {ll+=est.evalpdflog(y);} 292 293 _Ry->inv ( *_iRy ); // result is in _iRy; 294 _K = Pfull*C.transpose() * ( _iRy->to_mat() ); 295 296 sq_T pom ( ( int ) Pfull.rows() ); 297 _iRy->mult_sym_t ( C*Pfull,pom ); 298 ( *_P ) -= pom; // P = P -PC'iRy*CP; 299 *_yp = phxu->eval ( *_mu,u ); //y prediction 300 ( *_mu ) += _K* ( y-*_yp ); 301 302 if ( evalll==true ) {ll+=fy.evalpdflog ( y );} 231 303 }; 232 304 -
TabularUnified bdm/estim/libPF.cpp ¶
r28 r32 5 5 using std::endl; 6 6 7 PF::PF(vec w0){w=w0/sum(w0); n=w.length();}8 7 9 ivec PF::resample( RESAMPLING_METHOD method ) { 10 ivec ind=zeros_i( n ); 11 ivec N_babies = zeros_i( n ); 12 vec cumDist = cumsum( w ); 13 vec u( n ); 14 int i,j,parent; 15 double u0; 8 void PF::bayes ( const vec &dt ) { 9 int i; 10 vec lls ( n ); 11 ivec ind; 12 double mlls=-std::numeric_limits<double>::infinity(), sum=0.0; 16 13 17 switch ( method ) { 18 case MULTINOMIAL: 19 u( n - 1 ) = pow( URNG.sample(), 1.0 / n ); 20 for ( i = n - 2;i >= 0;i-- ) { 21 u( i ) = u( i + 1 ) * pow( URNG.sample(), 1.0 / ( i + 1 ) ); 22 } 23 break; 24 case STRATIFIED: 25 for ( i = 0;i < n;i++ ) { 26 u( i ) = ( i + URNG.sample() ) / n; 27 } 28 break; 29 case SYSTEMATIC: 30 u0 = URNG.sample(); 31 for ( i = 0;i < n;i++ ) { 32 u( i ) = ( i + u0 ) / n; 33 } 34 break; 35 default: 36 it_error( "PF::resample(): Unknown resampling method" ); 37 } 38 39 // // <<<<<<<<<<< 40 // using std::cout; 41 // cout << "resampling:" << endl; 42 // cout << w <<endl; 43 // cout << cumDist <<endl; 44 // cout << u <<endl; 14 for ( i=0;i<n;i++ ) { 15 //generate new samples from paramater evolution model; 16 _samples ( i ) = par.samplecond ( _samples ( i ), lls ( i ) ); 17 lls ( i ) *= obs.evalcond ( dt,_samples ( i ) ); 45 18 46 // U is now full 47 j = 0; 48 for ( i = 0;i < n;i++ ) { 49 while ( u( i ) > cumDist( j ) ) j++; 50 N_babies( j )++; 19 if ( lls ( i ) >mlls ) mlls=lls ( i ); //find maximum 51 20 } 52 21 53 // // <<<<<<<<<<< 54 // cout << N_babies <<endl; 22 // compute weights 23 for ( i=0;i<n;i++ ) { 24 _w ( i ) *= exp ( lls ( i ) - mlls ); // multiply w by likelihood 25 } 55 26 56 // We have assigned new babies for each Particle 57 // Now, we fill the resulting index such that: 58 // * particles with at least one baby should not move * 59 // This assures that reassignment can be done inplace; 27 //renormalize 28 for ( i=0;i<n;i++ ) {sum+=_w ( i );}; 60 29 61 // find the first parent; 62 parent=0; while(N_babies(parent)==0) parent++; 63 // Build index 64 for ( i = 0;i < n;i++ ) { 65 if ( N_babies( i ) > 0 ){ 66 ind( i ) = i; 67 N_babies( i ) --; //this index was now replicated; 68 } 69 else { 70 // test if the parent has been fully replicated 71 // if yes, find the next one 72 while((N_babies(parent)==0) || (N_babies(parent)==1 && parent>i) ) parent++; 73 // Replicate parent 74 ind (i) = parent; 75 N_babies( parent ) --; //this index was now replicated; 76 } 77 /* // <<<<<<<<<<< 78 cout <<ind << endl;*/ 79 } 80 return ind; 30 _w ( i ) /=sum; //? 31 32 ind = est.resample(); 33 81 34 } 82 35 83 TrivialPF::TrivialPF( mpdf &par0, mpdf &obs0, BM &prop0, int n0 ) : PF(1/n*ones(n)) { 84 is_proposal = true; 85 prop = &prop0; 86 par = &par0; 87 obs = &obs0; 88 } 89 TrivialPF::TrivialPF( mpdf &par0, mpdf &obs0, int n0 ) : PF(1/n*ones(n)) { 90 is_proposal = false; 91 par = &par0; 92 obs = &obs0; 36 void PF::set_est ( const epdf &epdf0 ) { 37 int i; 38 39 for ( i=0;i<n;i++ ) { 40 _samples ( i ) = epdf0.sample(); 41 } 93 42 } 94 43 95 void TrivialPF::bayes( const vec &dt , bool evalll ) { 96 int i; 97 vec oldp; 98 double ll, gl, sum = 0.0; 99 Sort<double> S; 100 ivec ind, iw; 101 102 //generate new samples 103 for ( i=0;i<n;i++ ) { 104 if(is_proposal) { 105 epdf* prop_epdf; 106 // prop_epdf = prop._epdf(); 107 prop->bayes(dt); 108 ptcls( i ) = prop_epdf->sample(); 109 } 110 // gl = prop_cond.eval( ptcls( i ) ); 111 112 // obs.evalcond( ptcls( i ), &obs_cond ); 113 // ll = obs_cond.eval( dt ); 114 w( i ) *= ll/gl; 115 } 116 //renormalize 117 for ( i=0;i<n;i++ ){sum+=w( i );}; 118 w( i ) /=sum; //? 119 120 ind = resample(); 121 iw = S.sort_index( 0,n-1,w ); // the first one in iw is the strongest 122 123 for ( i=0;i<n;i++ ) { 124 ptcls( i ) = ptcls( i ); //potentionally dangerous! 125 } 126 127 } 44 //MPF::MPF:{} -
TabularUnified bdm/estim/libPF.h ¶
r28 r32 15 15 16 16 #include <itpp/itbase.h> 17 #include "../stat/lib BM.h"17 #include "../stat/libEF.h" 18 18 #include "../math/libDC.h" 19 19 20 20 using namespace itpp; 21 21 22 enum RESAMPLING_METHOD { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 }; 22 /*! 23 * \brief Trivial particle filter with proposal density equal to parameter evolution model. 23 24 24 /*! 25 * \brief A Particle Filter prototype25 Posterior density is represented by a weighted empirical density (\c eEmp ). 26 */ 26 27 27 Bayesian Filtering equations hold. 28 */ 29 class PF : public BM { 28 class PF : public BM { 30 29 protected: 31 int n; //number of particles 32 vec w; //particle weights 33 Uniform_RNG URNG; //used for resampling 34 30 //!number of particles; 31 int n; 32 //!posterior density 33 eEmp est; 34 //! pointer into \c eEmp 35 vec &_w; 36 //! pointer into \c eEmp 37 Array<vec> &_samples; 38 //! Parameter evolution model 39 mpdf ∥ 40 //! Observation model 41 mpdf &obs; 35 42 public: 36 //! Returns indexes of particles that should be resampled. The ordering MUST guarantee inplace replacement. (Important for MPF.) 37 ivec resample(RESAMPLING_METHOD method = SYSTEMATIC); 38 PF (vec w); 43 PF ( const RV &rv0, mpdf &par0, mpdf &obs0, int n0 ) :BM ( rv0 ), 44 n ( n0 ),est ( rv0,n ),_w ( est._w() ),_samples ( est._samples() ), 45 par ( par0 ), obs ( obs0 ) {}; 46 47 // void set_parametres(mpdf &par0, mpdf &obs0) {par=&par0;obs=&obs0;}; 48 void set_est ( const epdf &epdf0 ); 39 49 //TODO remove or implement bayes()! 40 void bayes(const vec &dt){}; 41 epdf* _epdf(){return NULL;} 50 void bayes ( const vec &dt ); 42 51 }; 43 52 44 53 /*! 45 * \brief Trivial particle filter with proposal density that is not conditioned on the data. 54 \brief Marginalized Particle filter 46 55 47 56 Trivial version: proposal $=$ parameter evolution, observation model is not used. (it is assumed to be part of BM). 48 57 */ 49 58 50 class TrivialPF : public PF { 51 Array<vec> ptcls; 52 53 bool is_proposal; 54 BM *prop; 55 mpdf *par; 56 mpdf *obs; 57 59 template<class BM_T> 60 61 class MPF : public PF { 62 BM_T* Bms[1000]; 63 64 //! internal class for MPDF providing composition of eEmp with external components 65 66 class mpfepdf : public epdf { 67 protected: 68 eEmp &E; 69 vec &_w; 70 Array<epdf*> Coms; 58 71 public: 59 TrivialPF(mpdf &par, mpdf &obs, BM &prop, int n0); 60 TrivialPF(mpdf &par, mpdf &obs, int n0); 61 void bayes(const vec &dt, bool evalll); 72 mpfepdf ( eEmp &E0, const RV &rvc ) : 73 epdf ( RV( ) ), E ( E0 ), _w ( E._w() ), 74 Coms ( _w.length() ) { 75 rv.add ( E._rv() ); 76 rv.add ( rvc ); 77 }; 78 79 void set_elements ( int &i, double wi, epdf* ep ) 80 {_w ( i ) =wi; Coms ( i ) =ep;}; 81 82 vec mean() const { 83 // ugly 84 vec pom=zeros ( ( Coms ( 0 )->_rv() ).count() ); 85 86 for ( int i=0; i<_w.length(); i++ ) {pom += Coms ( i )->mean() * _w ( i );} 87 88 return concat ( E.mean(),pom ); 89 } 90 91 vec sample() const {it_error ( "Not implemented" );return 0;} 92 93 double evalpdflog ( const vec &val ) const {it_error ( "not implemented" ); return 0.0;} 94 }; 95 96 //! estimate joining PF.est with conditional 97 mpfepdf jest; 98 99 public: 100 //! Default constructor. 101 MPF ( const RV &rvlin, const RV &rvpf, mpdf &par0, mpdf &obs0, int n, const BM_T &BMcond0 ) : PF ( rvpf ,par0,obs0,n ),jest ( est,rvlin ) { 102 // 103 //TODO test if rv and BMcond.rv are compatible. 104 rv.add ( rvlin ); 105 // 106 107 if ( n>1000 ) it_error ( "increase 1000 here!" ); 108 109 for ( int i=0;i<n;i++ ) { 110 Bms[i] = new BM_T ( BMcond0 ); //copy constructor 111 epdf& pom=Bms[i]->_epdf(); 112 jest.set_elements ( i,1.0/n,&pom ); 113 } 114 }; 115 116 ~MPF() { 117 } 118 119 void bayes ( const vec &dt ); 120 epdf& _epdf() {return jest;} 121 122 void set_est ( const epdf& epdf0 ) { 123 PF::set_est ( epdf0 ); // sample params in condition 124 // copy conditions to BMs 125 126 for ( int i=0;i<n;i++ ) {Bms[i]->condition ( _samples ( i ) );} 127 } 62 128 }; 63 129 64 class MPF : public TrivialPF { 65 Array<BM> Bms; 66 public: 67 MPF(BM &B, BM &prop, mpdf &obs, mpdf &par); 68 void bayes(vec &dt); 69 }; 130 template<class BM_T> 131 void MPF<BM_T>::bayes ( const vec &dt ) { 132 int i; 133 vec lls ( n ); 134 ivec ind; 135 double mlls=-std::numeric_limits<double>::infinity(); 136 double sum=0.0; 137 138 for ( i=0;i<n;i++ ) { 139 //generate new samples from paramater evolution model; 140 _samples ( i ) = par.samplecond ( _samples ( i ), lls ( i ) ); 141 Bms[i]->condition ( _samples ( i ) ); 142 Bms[i]->bayes ( dt ); 143 lls ( i ) += Bms[i]->_ll(); 144 145 if ( lls ( i ) >mlls ) mlls=lls ( i ); //find maximum likelihood (for numerical stability) 146 } 147 148 // compute weights 149 for ( i=0;i<n;i++ ) { 150 _w ( i ) *= exp ( lls ( i ) - mlls ); // multiply w by likelihood 151 } 152 153 //renormalize 154 for ( i=0;i<n;i++ ) {sum+=_w ( i );}; 155 156 _w /=sum; //? 157 158 if ( ( _w*_w ) < ( 0.5*n ) ) { 159 ind = est.resample(); 160 // Resample Bms! 161 162 for ( i=0;i<n;i++ ) { 163 if ( ind ( i ) !=i ) {//replace the current Bm by a new one 164 //fixme this would require new assignment operator 165 // *Bms[i] = *Bms[ind ( i ) ]; 166 167 // poor-man's solution: replicate constructor here 168 // copied from MPF::MPF 169 delete Bms[i]; 170 Bms[i] = new BM_T ( *Bms[ind ( i ) ] ); //copy constructor 171 epdf& pom=Bms[i]->_epdf(); 172 jest.set_elements ( i,1.0/n,&pom ); 173 } 174 }; 175 } 176 } 70 177 71 178 #endif // KF_H -
TabularUnified bdm/itpp_ext.cpp ¶
r15 r32 12 12 13 13 #include <itpp/itbase.h> 14 #include "itpp_ext.h" 14 15 15 16 namespace itpp { … … 23 24 } 24 25 25 26 //Gamma 27 28 Gamma_RNG::Gamma_RNG(double a, double b) 29 { 30 setup(a,b); 31 } 32 33 #define log std::log 34 #define exp std::exp 35 #define sqrt std::sqrt 36 #define R_FINITE std::isfinite 37 38 double Gamma_RNG::sample() 39 { 40 //A copy of rgamma code from the R package!! 41 // 42 43 /* Constants : */ 44 const static double sqrt32 = 5.656854; 45 const static double exp_m1 = 0.36787944117144232159;/* exp(-1) = 1/e */ 46 47 /* Coefficients q[k] - for q0 = sum(q[k]*a^(-k)) 48 * Coefficients a[k] - for q = q0+(t*t/2)*sum(a[k]*v^k) 49 * Coefficients e[k] - for exp(q)-1 = sum(e[k]*q^k) 50 */ 51 const static double q1 = 0.04166669; 52 const static double q2 = 0.02083148; 53 const static double q3 = 0.00801191; 54 const static double q4 = 0.00144121; 55 const static double q5 = -7.388e-5; 56 const static double q6 = 2.4511e-4; 57 const static double q7 = 2.424e-4; 58 59 const static double a1 = 0.3333333; 60 const static double a2 = -0.250003; 61 const static double a3 = 0.2000062; 62 const static double a4 = -0.1662921; 63 const static double a5 = 0.1423657; 64 const static double a6 = -0.1367177; 65 const static double a7 = 0.1233795; 66 67 /* State variables [FIXME for threading!] :*/ 68 static double aa = 0.; 69 static double aaa = 0.; 70 static double s, s2, d; /* no. 1 (step 1) */ 71 static double q0, b, si, c;/* no. 2 (step 4) */ 72 73 double e, p, q, r, t, u, v, w, x, ret_val; 74 double a=alpha; 75 double scale=1.0/beta; 76 77 if (!R_FINITE(a) || !R_FINITE(scale) || a < 0.0 || scale <= 0.0) 78 it_error("Gamma_RNG wrong parameters"); 79 80 if (a < 1.) { /* GS algorithm for parameters a < 1 */ 81 if(a == 0) 82 return 0.; 83 e = 1.0 + exp_m1 * a; 84 for(;;) { //VS repeat 85 p = e * unif_rand(); 86 if (p >= 1.0) { 87 x = -log((e - p) / a); 88 if (exp_rand() >= (1.0 - a) * log(x)) 89 break; 90 } else { 91 x = exp(log(p) / a); 92 if (exp_rand() >= x) 93 break; 94 } 95 } 96 return scale * x; 97 } 98 99 /* --- a >= 1 : GD algorithm --- */ 100 101 /* Step 1: Recalculations of s2, s, d if a has changed */ 102 if (a != aa) { 103 aa = a; 104 s2 = a - 0.5; 105 s = sqrt(s2); 106 d = sqrt32 - s * 12.0; 107 } 108 /* Step 2: t = standard normal deviate, 109 x = (s,1/2) -normal deviate. */ 110 111 /* immediate acceptance (i) */ 112 t = norm_rand(); 113 x = s + 0.5 * t; 114 ret_val = x * x; 115 if (t >= 0.0) 116 return scale * ret_val; 117 118 /* Step 3: u = 0,1 - uniform sample. squeeze acceptance (s) */ 119 u = unif_rand(); 120 if ((d * u) <= (t * t * t)) 121 return scale * ret_val; 122 123 /* Step 4: recalculations of q0, b, si, c if necessary */ 124 125 if (a != aaa) { 126 aaa = a; 127 r = 1.0 / a; 128 q0 = ((((((q7 * r + q6) * r + q5) * r + q4) * r + q3) * r 129 + q2) * r + q1) * r; 130 131 /* Approximation depending on size of parameter a */ 132 /* The constants in the expressions for b, si and c */ 133 /* were established by numerical experiments */ 134 135 if (a <= 3.686) { 136 b = 0.463 + s + 0.178 * s2; 137 si = 1.235; 138 c = 0.195 / s - 0.079 + 0.16 * s; 139 } else if (a <= 13.022) { 140 b = 1.654 + 0.0076 * s2; 141 si = 1.68 / s + 0.275; 142 c = 0.062 / s + 0.024; 143 } else { 144 b = 1.77; 145 si = 0.75; 146 c = 0.1515 / s; 147 } 148 } 149 /* Step 5: no quotient test if x not positive */ 150 151 if (x > 0.0) { 152 /* Step 6: calculation of v and quotient q */ 153 v = t / (s + s); 154 if (fabs(v) <= 0.25) 155 q = q0 + 0.5 * t * t * ((((((a7 * v + a6) * v + a5) * v + a4) * v 156 + a3) * v + a2) * v + a1) * v; 157 else 158 q = q0 - s * t + 0.25 * t * t + (s2 + s2) * log(1.0 + v); 159 160 161 /* Step 7: quotient acceptance (q) */ 162 if (log(1.0 - u) <= q) 163 return scale * ret_val; 164 } 165 166 for(;;) { //VS repeat 167 /* Step 8: e = standard exponential deviate 168 * u = 0,1 -uniform deviate 169 * t = (b,si)-double exponential (laplace) sample */ 170 e = exp_rand(); 171 u = unif_rand(); 172 u = u + u - 1.0; 173 if (u < 0.0) 174 t = b - si * e; 175 else 176 t = b + si * e; 177 /* Step 9: rejection if t < tau(1) = -0.71874483771719 */ 178 if (t >= -0.71874483771719) { 179 /* Step 10: calculation of v and quotient q */ 180 v = t / (s + s); 181 if (fabs(v) <= 0.25) 182 q = q0 + 0.5 * t * t * 183 ((((((a7 * v + a6) * v + a5) * v + a4) * v + a3) * v 184 + a2) * v + a1) * v; 185 else 186 q = q0 - s * t + 0.25 * t * t + (s2 + s2) * log(1.0 + v); 187 /* Step 11: hat acceptance (h) */ 188 /* (if q not positive go to step 8) */ 189 if (q > 0.0) { 190 w = expm1(q); 191 /* ^^^^^ original code had approximation with rel.err < 2e-7 */ 192 /* if t is rejected sample again at step 8 */ 193 if ((c * fabs(u)) <= (w * exp(e - 0.5 * t * t))) 194 break; 195 } 196 } 197 } /* repeat .. until `t' is accepted */ 198 x = s + 0.5 * t; 199 return scale * x * x; 26 200 } 201 202 } -
TabularUnified bdm/itpp_ext.h ¶
r15 r32 12 12 #include <itpp/itbase.h> 13 13 14 using std::cout; 15 using std::endl; 16 14 17 namespace itpp { 15 18 Array<int> to_Arr(const ivec &indices); 19 20 /*! 21 \brief Gamma distribution 22 \ingroup randgen 23 */ 24 class Gamma_RNG { 25 public: 26 //! constructor. Set lambda. 27 Gamma_RNG(double a=1.0, double b=1.0); 28 //! Set lambda 29 void setup(double a0, double b0) { alpha=a0; beta=b0;} 30 //! get lambda 31 double get_setup() const; 32 //! Get one sample. 33 double operator()() { return sample(); } 34 //! Get a sample vector. 35 vec operator()(int n); 36 //! Get a sample matrix. 37 mat operator()(int h, int w); 38 protected: 39 private: 40 //! 41 double sample(); 42 //! 43 double alpha; 44 //! 45 double beta; 46 //! 47 Random_Generator RNG; 48 Normal_RNG NRNG; 49 //! compatibility with R 50 inline double exp_rand(){return -std::log(RNG.random_01());} 51 inline double unif_rand(){return RNG.random_01();} 52 inline double norm_rand(){return NRNG.sample();} 53 54 }; 16 55 } -
TabularUnified bdm/math/libDC.cpp ¶
r26 r32 17 17 void fsqmat::mult_sym ( const mat &C) {M=C *M*C.T();}; 18 18 void fsqmat::mult_sym_t ( const mat &C) {M=C.T() *M*C;}; 19 void fsqmat::mult_sym ( const mat &C, fsqmat &U) { U.M = ( C *(M*C.T()) );};20 void fsqmat::mult_sym_t ( const mat &C, fsqmat &U) { U.M = ( C.T() *(M*C) );};19 void fsqmat::mult_sym ( const mat &C, fsqmat &U) const { U.M = ( C *(M*C.T()) );}; 20 void fsqmat::mult_sym_t ( const mat &C, fsqmat &U) const { U.M = ( C.T() *(M*C) );}; 21 21 void fsqmat::inv ( fsqmat &Inv ) {mat IM = itpp::inv ( M ); Inv=IM;}; 22 22 void fsqmat::clear() {M.clear();}; 23 fsqmat::fsqmat ( const mat &M0 ) 23 fsqmat::fsqmat ( const mat &M0 ) : sqmat(M0.cols()) 24 24 { 25 25 it_assert_debug ( ( M0.cols() ==M0.rows() ),"M0 must be square" ); 26 M=M0; dim=M0.cols();26 M=M0; 27 27 }; 28 28 29 fsqmat::fsqmat() {};30 31 fsqmat::fsqmat(const int dim0): M(dim0,dim0) {};32 33 std::ostream &operator<< ( std::ostream &os, fsqmat &ld ) {29 //fsqmat::fsqmat() {}; 30 31 fsqmat::fsqmat(const int dim0): sqmat(dim0), M(dim0,dim0) {}; 32 33 std::ostream &operator<< ( std::ostream &os, const fsqmat &ld ) { 34 34 os << ld.M << endl; 35 35 return os; … … 37 37 38 38 39 ldmat::ldmat( const mat &exL, const vec &exD ) {39 ldmat::ldmat( const mat &exL, const vec &exD ) : sqmat(exD.length()) { 40 40 D = exD; 41 41 L = exL; 42 dim = exD.length(); 43 } 44 45 ldmat::ldmat() { 46 dim = 0; 47 } 48 49 ldmat::ldmat(const int dim0): D(dim0),L(dim0,dim0) { 50 dim = dim0; 51 } 52 53 ldmat::ldmat(const vec D0) { 42 } 43 44 ldmat::ldmat() :sqmat(0) {} 45 46 ldmat::ldmat(const int dim0): sqmat(dim0), D(dim0),L(dim0,dim0) {} 47 48 ldmat::ldmat(const vec D0):sqmat(D0.length()) { 54 49 D = D0; 55 dim = D0.length();56 50 L = eye(dim); 57 51 } 58 52 59 ldmat::ldmat( const mat &V ) {53 ldmat::ldmat( const mat &V ):sqmat(V.cols()) { 60 54 //TODO check if correct!! Based on heuristic observation of lu() 61 55 62 dim = V.cols();63 56 it_assert_debug( dim == V.rows(),"ldmat::ldmat matrix V is not square!" ); 64 57 … … 86 79 } 87 80 88 std::ostream &operator<< ( std::ostream &os, ldmat &ld ) {81 std::ostream &operator<< ( std::ostream &os, const ldmat &ld ) { 89 82 os << "L:" << ld.L << endl; 90 83 os << "D:" << ld.D << endl; … … 130 123 void ldmat::clear(){L.clear(); for ( int i=0;i<L.cols();i++ ){L( i,i )=1;}; D.clear();} 131 124 132 void ldmat::inv( ldmat &Inv ) {125 void ldmat::inv( ldmat &Inv ) const { 133 126 int dim = D.length(); 134 127 Inv.clear(); //Inv = zero in LD … … 152 145 } 153 146 154 void ldmat::mult_sym( const mat &C, ldmat &U) {147 void ldmat::mult_sym( const mat &C, ldmat &U) const { 155 148 mat A=L*C.T(); //could be done more efficiently using BLAS 156 149 U.ldform(A,D); 157 150 } 158 151 159 void ldmat::mult_sym_t( const mat &C, ldmat &U) {152 void ldmat::mult_sym_t( const mat &C, ldmat &U) const { 160 153 mat A=L*C; 161 154 /* vec nD=zeros(U.rows()); … … 173 166 } 174 167 175 double ldmat::qform( const vec &v ) {168 double ldmat::qform( const vec &v ) const { 176 169 double x = 0.0, sum; 177 170 int i,j; … … 179 172 for ( i=0; i<D.length(); i++ ) { //rows of L 180 173 sum = 0.0; 181 for ( j= 0; j<=i; j++ ){sum+=L( i,j )*v( j);}174 for ( j=i; j<=i; j++ ){sum+=L( i,j )*v( i );} 182 175 x +=D( i )*sum*sum; 183 176 }; … … 191 184 } 192 185 193 vec ldmat::sqrt_mult( const vec &x ) {186 vec ldmat::sqrt_mult( const vec &x ) const { 194 187 int i,j; 195 188 vec res( dim ); … … 383 376 } 384 377 } 385 386 -
TabularUnified bdm/math/libDC.h ¶
r28 r32 61 61 Used e.g. in generating normal samples. 62 62 */ 63 virtual vec sqrt_mult (const vec &v ) =0;63 virtual vec sqrt_mult (const vec &v ) const =0; 64 64 65 65 /*! … … 67 67 68 68 */ 69 virtual double qform (const vec &v ) =0;69 virtual double qform (const vec &v ) const =0; 70 70 71 71 // //! easy version of the … … 83 83 //! Destructor for future use; 84 84 virtual ~sqmat(){}; 85 //! Default constructor 86 sqmat(const int dim0): dim(dim0){}; 85 87 protected: 86 88 int dim; … … 101 103 void mult_sym ( const mat &C); 102 104 void mult_sym_t ( const mat &C); 103 void mult_sym ( const mat &C, fsqmat &U) ;104 void mult_sym_t ( const mat &C, fsqmat &U) ;105 void mult_sym ( const mat &C, fsqmat &U) const; 106 void mult_sym_t ( const mat &C, fsqmat &U) const; 105 107 void clear(); 106 108 … … 124 126 125 127 double logdet() const {return log ( det ( M ) );}; 126 double qform (const vec &v ) {return ( v* ( M*v ) );};127 vec sqrt_mult (const vec &v ) {it_error ( "not implemented" );return v;};128 double qform (const vec &v ) const {return ( v* ( M*v ) );}; 129 vec sqrt_mult (const vec &v ) const {it_error ( "not implemented" );return v;}; 128 130 129 131 fsqmat& operator += ( const fsqmat &A ) {M+=A.M;return *this;}; … … 132 134 // fsqmat& operator = ( const fsqmat &A) {M=A.M; return *this;}; 133 135 134 friend std::ostream &operator<< ( std::ostream &os, fsqmat &sq );136 friend std::ostream &operator<< ( std::ostream &os, const fsqmat &sq ); 135 137 136 138 }; … … 162 164 void add ( const ldmat &ld2, double w=1.0 ); 163 165 double logdet() const; 164 double qform (const vec &v ) ;166 double qform (const vec &v ) const; 165 167 // sqmat& operator -= ( const sqmat & ld2 ); 166 168 void clear(); 167 169 int cols() const; 168 170 int rows() const; 169 vec sqrt_mult ( const vec &v ) ;171 vec sqrt_mult ( const vec &v ) const; 170 172 171 173 /*! \brief Matrix inversion preserving the chosen form. … … 174 176 175 177 */ 176 virtual void inv ( ldmat &Inv ) ;178 virtual void inv ( ldmat &Inv ) const; 177 179 178 180 /*! \brief Symmetric multiplication of $U$ by a general matrix $C$, result of which is stored in the current class. … … 181 183 182 184 */ 183 void mult_sym ( const mat &C, ldmat &U) ;185 void mult_sym ( const mat &C, ldmat &U) const; 184 186 185 187 /*! \brief Symmetric multiplication of $U$ by a transpose of a general matrix $C$, result of which is stored in the current class. … … 188 190 189 191 */ 190 void mult_sym_t ( const mat &C, ldmat &U) ;192 void mult_sym_t ( const mat &C, ldmat &U) const; 191 193 192 194 … … 200 202 */ 201 203 void ldform (const mat &A,const vec &D0 ); 204 205 //! Access functions 206 void setD (const vec &nD){D=nD;} 207 void setL (const vec &nL){L=nL;} 202 208 203 209 ldmat& operator += ( const ldmat &ldA ); … … 205 211 ldmat& operator *= ( double x ); 206 212 207 friend std::ostream &operator<< ( std::ostream &os, ldmat &sq ); 213 friend std::ostream &operator<< ( std::ostream &os, const ldmat &sq ); 214 208 215 209 216 protected: -
TabularUnified bdm/stat/libBM.cpp ¶
r27 r32 7 7 using std::cout; 8 8 9 void RV::init( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times , ivec in_obs) {9 void RV::init( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times ) { 10 10 // 11 11 int i; … … 16 16 ( len != in_names.length() ) || \ 17 17 ( len != in_sizes.length() ) || \ 18 ( len != in_times.length() ) || \ 19 ( len != in_obs.length() ) ) { 18 ( len != in_times.length() )) { 20 19 it_error( "RV::RV inconsistent length of input vectors." ); 21 20 } … … 25 24 sizes = in_sizes; 26 25 times = in_times; 27 obs = in_obs;28 26 size = 0; 29 27 for(i=0;i<len;i++){size+=sizes(i);} 30 28 }; 31 29 32 RV::RV ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times , ivec in_obs) {33 init ( in_ids, in_names, in_sizes, in_times , in_obs);30 RV::RV ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times ) { 31 init ( in_ids, in_names, in_sizes, in_times ); 34 32 } 35 33 36 RV::RV () {}; 34 RV::RV () : size(0),len(0){}; 35 36 void RV::add (const RV &rv2) { 37 // TODO 38 size+=rv2.size; 39 len +=rv2.len; 40 ids=concat(ids,rv2.ids); 41 sizes=concat(sizes,rv2.sizes); 42 times=concat(times,rv2.times); 43 names=concat(names,rv2.names); 44 // return *this; 45 }; 37 46 38 47 RV::RV ( ivec in_ids ) { … … 46 55 } 47 56 48 init ( in_ids, A, ones_i( len ), zeros_i( len ) , zeros_i( len ));57 init ( in_ids, A, ones_i( len ), zeros_i( len ) ); 49 58 } 50 59 51 60 RV RV::subselect(ivec ind){ 52 return RV(ids(ind), names(to_Arr(ind)), sizes(ind), times(ind) , obs(ind));61 return RV(ids(ind), names(to_Arr(ind)), sizes(ind), times(ind)); 53 62 } 54 63 … … 56 65 57 66 RV RV::operator()(ivec ind){ 58 return RV(ids(ind), names(to_Arr(ind)), sizes(ind), times(ind) , obs(ind));67 return RV(ids(ind), names(to_Arr(ind)), sizes(ind), times(ind)); 59 68 } 60 69 … … 77 86 return indlist; 78 87 } 88 89 RV concat(const RV &rv1, const RV &rv2 ){ 90 RV pom = rv1; 91 pom.add(rv2); 92 return pom; 93 } -
TabularUnified bdm/stat/libBM.h ¶
r28 r32 24 24 * More?... 25 25 */ 26 26 27 class RV { 28 protected: 27 29 //! size = sum of sizes 28 30 int size; … … 36 38 37 39 private: 38 void init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times , ivec in_obs);40 void init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times); 39 41 public: 40 42 //! Full constructor which is called by the others 41 RV ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times , ivec in_obs);43 RV ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times); 42 44 //! default constructor 43 45 RV ( ivec ids ); 44 46 //! Empty constructor will be set later 45 47 RV (); 46 48 47 49 //! Printing output e.g. for debugging. 48 50 friend std::ostream &operator<< ( std::ostream &os, const RV &rv ); … … 50 52 //! Return length (number of scalars) of the RV. 51 53 int count() const {return size;} ; 54 52 55 //TODO why not inline and later?? 53 56 54 57 //! Find indexes of another rv in self 55 ivec find (RV rv2);58 ivec find ( RV rv2 ); 56 59 //! Add (concat) another variable to the current one 57 RV add(RV rv2); 60 void add (const RV &rv2 ); 61 //! Add (concat) another variable to the current one 62 friend RV concat (const RV &rv1, const RV &rv2 ); 58 63 //! Subtract another variable from the current one 59 RV subt (RV rv2);64 RV subt ( RV rv2 ); 60 65 //! Select only variables at indeces ind 61 RV subselect (ivec ind);66 RV subselect ( ivec ind ); 62 67 //! Select only variables at indeces ind 63 RV operator() (ivec ind);68 RV operator() ( ivec ind ); 64 69 //! Generate new \c RV with \c time shifted by delta. 65 void t (int delta);66 //! generate a list of indeces, i.e. which 70 void t ( int delta ); 71 //! generate a list of indeces, i.e. which 67 72 ivec indexlist(); 68 73 }; 69 74 70 75 71 72 73 76 //! Class representing function $f(x)$ of variable $x$ represented by \c rv 77 74 78 class fnc { 75 79 protected: 76 80 int dimy; 77 public: 81 public: 78 82 //! function evaluates numerical value of $f(x)$ at $x=cond$ 79 virtual vec eval(const vec &cond) 80 { 81 return vec(0); 83 virtual vec eval ( const vec &cond ) { 84 return vec ( 0 ); 82 85 }; //Fixme: virtual? 83 86 84 87 //! access function 85 int _dimy() const{return dimy;}86 87 88 virtual ~fnc(){};88 int _dimy() const{return dimy;} 89 90 //! Destructor for future use; 91 virtual ~fnc() {}; 89 92 }; 90 93 91 94 92 95 //! Probability density function with numerical statistics, e.g. posterior density. 96 93 97 class epdf { 98 protected: 94 99 RV rv; 95 100 public: 96 101 //!default constructor 97 epdf():rv(ivec(0)){}; 102 epdf() :rv ( ivec ( 0 ) ) {}; 103 104 //!default constructor 105 epdf ( const RV &rv0 ) :rv ( rv0 ) {}; 106 98 107 //! Returns the required moment of the epdf 99 108 // virtual vec moment ( const int order = 1 ); 100 109 //! Returns a sample from the density, \f$x \sim epdf(rv)\f$ 101 virtual vec sample () =0;110 virtual vec sample () const =0; 102 111 //! Compute probability of argument \c val 103 virtual double eval(const vec &val){return 0.0;}; 112 virtual double eval ( const vec &val ) const {return exp(this->evalpdflog(val));}; 113 104 114 //! Compute log-probability of argument \c val 105 virtual double evalpdflog(const vec &val){return 0.0;}; 106 107 //! Destructor for future use; 108 virtual ~epdf(){}; 109 }; 115 virtual double evalpdflog ( const vec &val ) const =0; 116 117 //! return expected value 118 virtual vec mean() const =0; 119 120 //! Destructor for future use; 121 virtual ~epdf() {}; 122 //! access function 123 RV _rv() const {return rv;} 124 }; 125 110 126 111 127 //! Conditional probability density, e.g. modeling some dependencies. 128 //TODO Samplecond can be generalized 129 112 130 class mpdf { 131 protected: 113 132 //! modeled random variable 114 133 RV rv; 115 134 //! random variable in condition 116 135 RV rvc; 136 //! pointer to internal epdf 137 epdf* ep; 117 138 public: 118 139 119 140 //! Returns the required moment of the epdf 120 141 // virtual fnc moment ( const int order = 1 ); 121 //! Returns a sample from the density conditioned on \c cond, $x \sim epdf(rv|cond)$ 122 virtual vec samplecond (vec &cond, double lik){return vec(0);}; 123 virtual void condition (vec &cond){}; 124 125 //! Destructor for future use; 126 virtual ~mpdf(){}; 142 //! Returns a sample from the density conditioned on \c cond, $x \sim epdf(rv|cond)$. \param ll is a return value of log-likelihood of the sample. 143 virtual vec samplecond ( vec &cond, double &ll ) {this->condition(cond);vec temp= ep->sample();ll=ep->evalpdflog(temp);return temp;}; 144 145 virtual void condition ( const vec &cond ) {}; 146 147 virtual double evalcond (const vec &dt, const vec &cond ) {this->condition(cond);return ep->eval(dt);}; 148 149 //! Destructor for future use; 150 virtual ~mpdf() {}; 151 152 //! Default constructor 153 mpdf ( const RV &rv0, const RV &rvc0 ) :rv ( rv0 ),rvc ( rvc0 ) {}; 154 //! access function 155 RV _rvc(){return rvc;} 156 //!access function 157 epdf& _epdf(){return *ep;} 127 158 }; 128 159 … … 133 164 134 165 */ 166 135 167 class DS { 136 168 protected: 137 169 //!Observed variables, returned by \c getdata(). 138 RV Drv; 170 RV Drv; 139 171 //!Action variables, accepted by \c write(). 140 172 RV Urv; // 141 173 public: 142 //! Returns full vector of observed data 143 void getdata (vec &dt);174 //! Returns full vector of observed data 175 void getdata ( vec &dt ); 144 176 //! Returns data records at indeces. 145 void getdata (vec &dt, ivec &indeces);177 void getdata ( vec &dt, ivec &indeces ); 146 178 //! Accepts action variable and schedule it for application. 147 void write (vec &ut);148 //! Accepts action variables at specific indeces 149 void write (vec &ut, ivec &indeces);150 /*! \brief Method that assigns random variables to the datasource. 179 void write ( vec &ut ); 180 //! Accepts action variables at specific indeces 181 void write ( vec &ut, ivec &indeces ); 182 /*! \brief Method that assigns random variables to the datasource. 151 183 Typically, the datasource will be constructed without knowledge of random variables. This method will associate existing variables with RVs. 152 184 153 185 (Inherited from m3k, may be deprecated soon). 154 186 */ 155 void linkrvs (RV &drv, RV &urv);156 157 //! Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system. 187 void linkrvs ( RV &drv, RV &urv ); 188 189 //! Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system. 158 190 void step(); 159 191 160 192 }; 161 193 162 194 /*! \brief Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. 163 164 */ 195 196 */ 197 165 198 class BM { 166 public: 199 protected: 200 //!Random variable of the posterior 201 RV rv; 167 202 //!Logarithm of marginalized data likelihood. 168 203 double ll; 169 204 //! If true, the filter will compute likelihood of the data record and store it in \c ll . Set to false if you want to save time. 170 205 bool evalll; 206 public: 171 207 172 208 //!Default constructor 173 BM():ll(0),evalll(true){}; 174 209 BM(const RV &rv0) :rv(rv0), ll ( 0 ),evalll ( true ) {//Fixme: test rv 210 }; 211 175 212 /*! \brief Incremental Bayes rule 176 213 @param dt vector of input data 177 214 */ 178 virtual void bayes ( const vec &dt ) = 0;215 virtual void bayes ( const vec &dt ) = 0; 179 216 //! Batch Bayes rule (columns of Dt are observations) 180 217 void bayes ( mat Dt ); 181 218 //! Returns a pointer to the epdf representing posterior density on parameters. Use with care! 182 virtual epdf* _epdf()=0; 183 184 //! Destructor for future use; 185 virtual ~BM(){}; 219 virtual epdf& _epdf()=0; 220 221 //! Destructor for future use; 222 virtual ~BM() {}; 223 //!access function 224 const RV& _rv() const {return rv;} 225 //!access function 226 double _ll() const {return ll;} 227 }; 228 229 /*! 230 \brief Conditional Bayesian Filter 231 232 Evaluates conditional filtering density $f(rv|rvc,data)$ for a given \c rvc which is specified in each step by calling function \c condition. 233 234 This is an interface class used to assure that certain BM has operation \c condition . 235 236 */ 237 238 class BMcond { 239 protected: 240 RV rvc; 241 public: 242 //! Substitute \c val for \c rvc. 243 virtual void condition ( const vec &val ) =0; 244 BMcond(RV &rv0):rvc(rv0){}; 245 virtual ~BMcond(){}; 246 const RV& _rvc() const {return rvc;} 186 247 }; 187 248 -
TabularUnified bdm/stat/libEF.cpp ¶
r14 r32 1 1 #include <itpp/itbase.h> 2 #include <itpp/base/bessel.h> 2 3 #include "libEF.h" 4 #include <math.h> 3 5 4 6 using namespace itpp; 5 7 8 Uniform_RNG UniRNG; 9 Normal_RNG NorRNG; 10 Gamma_RNG GamRNG; 11 6 12 using std::cout; 7 13 14 vec egamma::sample() const { 15 vec smp ( rv.count() ); 16 int i; 17 18 for ( i=0; i<rv.count(); i++ ) { 19 GamRNG.setup ( alpha ( i ),beta ( i ) ); 20 smp ( i ) = GamRNG(); 21 } 22 23 return smp; 24 } 25 26 mat egamma::sample ( int N ) const { 27 mat Smp ( rv.count(),N ); 28 int i,j; 29 30 for ( i=0; i<rv.count(); i++ ) { 31 GamRNG.setup ( alpha ( i ),beta ( i ) ); 32 33 for ( j=0; j<N; j++ ) { 34 Smp ( i,j ) = GamRNG(); 35 } 36 } 37 38 return Smp; 39 } 40 41 double egamma::evalpdflog ( const vec &val ) const { 42 double res = 0.0; //will be added 43 int i; 44 45 for ( i=0; i<rv.count(); i++ ) { 46 res += ( alpha ( i ) - 1 ) *std::log ( val ( i ) ) + alpha ( i ) *std::log ( beta ( i ) ) - beta ( i ) *val ( i ) - lgamma ( alpha ( i ) ); 47 } 48 49 return res; 50 } 51 52 //MGamma 53 mgamma::mgamma ( const RV &rv,const RV &rvc ) : mEF ( rv,rvc ), epdf ( rv ) {vec* tmp; epdf._param ( tmp,_beta );}; 54 55 void mgamma::set_parameters ( double k0 ) { 56 k=k0; 57 ep = &epdf; 58 epdf.set_parameters ( k*ones ( rv.count() ),*_beta ); 59 }; 60 61 vec mgamma::samplecond ( vec &cond, double &ll ) { 62 *_beta=k / cond ; 63 vec smp = epdf.sample(); 64 ll = epdf.evalpdflog ( smp ); 65 return smp; 66 }; 67 68 //Fixme repetition of mlnorm.samplecond. 69 mat mgamma::samplecond ( vec &cond, vec &lik, int n ) { 70 int i; 71 int dim = rv.count(); 72 mat Smp ( dim,n ); 73 vec smp ( dim ); 74 this->condition ( cond ); 75 76 for ( i=0; i<n; i++ ) { 77 smp = epdf.sample(); 78 lik ( i ) = epdf.eval ( smp ); 79 Smp.set_col ( i ,smp ); 80 } 81 82 return Smp; 83 }; 84 85 ivec eEmp::resample ( RESAMPLING_METHOD method ) { 86 ivec ind=zeros_i ( n ); 87 ivec N_babies = zeros_i ( n ); 88 vec cumDist = cumsum ( w ); 89 vec u ( n ); 90 int i,j,parent; 91 double u0; 92 93 switch ( method ) { 94 case MULTINOMIAL: 95 u ( n - 1 ) = pow ( UniRNG.sample(), 1.0 / n ); 96 97 for ( i = n - 2;i >= 0;i-- ) { 98 u ( i ) = u ( i + 1 ) * pow ( UniRNG.sample(), 1.0 / ( i + 1 ) ); 99 } 100 101 break; 102 103 case STRATIFIED: 104 105 for ( i = 0;i < n;i++ ) { 106 u ( i ) = ( i + UniRNG.sample() ) / n; 107 } 108 109 break; 110 111 case SYSTEMATIC: 112 u0 = UniRNG.sample(); 113 114 for ( i = 0;i < n;i++ ) { 115 u ( i ) = ( i + u0 ) / n; 116 } 117 118 break; 119 120 default: 121 it_error ( "PF::resample(): Unknown resampling method" ); 122 } 123 124 // U is now full 125 j = 0; 126 127 for ( i = 0;i < n;i++ ) { 128 while ( u ( i ) > cumDist ( j ) ) j++; 129 130 N_babies ( j ) ++; 131 } 132 133 // We have assigned new babies for each Particle 134 // Now, we fill the resulting index such that: 135 // * particles with at least one baby should not move * 136 // This assures that reassignment can be done inplace; 137 138 // find the first parent; 139 parent=0; while ( N_babies ( parent ) ==0 ) parent++; 140 141 // Build index 142 for ( i = 0;i < n;i++ ) { 143 if ( N_babies ( i ) > 0 ) { 144 ind ( i ) = i; 145 N_babies ( i ) --; //this index was now replicated; 146 } else { 147 // test if the parent has been fully replicated 148 // if yes, find the next one 149 while ( ( N_babies ( parent ) ==0 ) || ( N_babies ( parent ) ==1 && parent>i ) ) parent++; 150 151 // Replicate parent 152 ind ( i ) = parent; 153 154 N_babies ( parent ) --; //this index was now replicated; 155 } 156 157 } 158 159 // copy the internals according to ind 160 for ( i=0;i<n;i++ ) { 161 if ( ind ( i ) !=i ) { 162 samples ( i ) =samples ( ind ( i ) ); 163 } 164 w ( i ) = 1.0/n; 165 } 166 167 return ind; 168 } 169 170 void eEmp::set_parameters ( const vec &w0, epdf* epdf0 ) { 171 //it_assert_debug(rv==epdf0->rv(),"Wrong epdf0"); 172 w=w0; 173 w/=sum ( w0 );//renormalize 174 n=w.length(); 175 samples.set_size ( n ); 176 177 for ( int i=0;i<n;i++ ) {samples ( i ) =epdf0->sample();} 178 } -
TabularUnified bdm/stat/libEF.h ¶
r28 r32 17 17 #include "../math/libDC.h" 18 18 #include "libBM.h" 19 #include "../itpp_ext.h" 19 20 //#include <std> 20 21 21 22 using namespace itpp; 22 23 24 25 //! Global Uniform_RNG 26 extern Uniform_RNG UniRNG; 27 extern Normal_RNG NorRNG; 28 extern Gamma_RNG GamRNG; 29 30 23 31 /*! 24 32 * \brief General conjugate exponential family posterior density. … … 30 38 31 39 public: 40 // eEF() :epdf() {}; 32 41 //! default constructor 33 eEF () :epdf() {};42 eEF ( const RV &rv ) :epdf ( rv ) {}; 34 43 35 44 virtual void tupdate ( double phi, mat &vbar, double nubar ) {}; … … 41 50 42 51 public: 43 52 mEF ( const RV &rv0, const RV &rvc0 ) :mpdf ( rv0,rvc0 ) {}; 44 53 }; 45 54 … … 61 70 //! indicator if \c _iR is chached 62 71 bool cached; 63 //! Random number generator for sampling; Fixme: what about *static* correct ?64 Normal_RNG RNG;65 72 //! dimension (redundant from rv.count() for easier coding ) 66 73 int dim; 67 74 public: 68 enorm() :eEF() {};75 // enorm() :eEF() {}; 69 76 70 77 enorm ( RV &rv ); … … 74 81 void dupdate ( mat &v,double nu=1.0 ); 75 82 76 vec sample(); 77 mat sample ( int N ); 78 double eval ( const vec &val ); 79 double evalpdflog ( const vec &val ); 83 vec sample() const; 84 mat sample ( int N ) const; 85 double eval ( const vec &val ) const ; 86 double evalpdflog ( const vec &val ) const; 87 vec mean()const {return mu;} 80 88 81 89 //Access methods … … 94 102 95 103 /*! 96 \brief 97 */ 98 template<class sq_T> 99 104 \brief Gamma posterior density 105 106 Multvariate Gamma density as product of independent univariate densities. 107 \f[ 108 f(x|a,b) = \prod f(x_i|a_i,b_i) 109 \f] 110 */ 111 112 class egamma : public eEF { 113 protected: 114 vec alpha; 115 vec beta; 116 public : 117 //! Default constructor 118 egamma ( const RV &rv ) :eEF ( rv ) {}; 119 //! Sets parameters 120 void set_parameters ( const vec &a, const vec &b ) {alpha=a,beta=b;}; 121 vec sample() const; 122 mat sample ( int N ) const; 123 double evalpdflog ( const vec &val ) const; 124 //! Returns poiter to alpha and beta. Potentially dengerous: use with care! 125 void _param ( vec* &a, vec* &b ) {a=αb=β}; 126 vec mean()const {vec pom(alpha); pom/=beta; return pom;} 127 }; 128 129 //! Weighted mixture of epdfs with external owned components. 130 class emix : public epdf { 131 protected: 132 int n; 133 vec &w; 134 Array<epdf*> Coms; 135 public: 136 //! Default constructor 137 emix ( const RV &rv, vec &w0): epdf(rv), n(w0.length()), w(w0), Coms(n) {}; 138 void set_parameters( int &i, double wi, epdf* ep){w(i)=wi;Coms(i)=ep;} 139 vec mean(){vec pom; for(int i=0;i<n;i++){pom+=Coms(i)->mean()*w(i);} return pom;}; 140 vec sample() {it_error ( "Not implemented" );return 0;} 141 }; 142 143 //! Uniform distributed density on a rectangular support 144 145 class euni: public epdf { 146 protected: 147 //! lower bound on support 148 vec low; 149 //! upper bound on support 150 vec high; 151 //! internal 152 vec distance; 153 //! normalizing coefficients 154 double nk,lnk; 155 public: 156 euni ( const RV rv ) :epdf ( rv ) {} 157 double eval ( const vec &val ) const {return nk;} 158 double evalpdflog ( const vec &val ) const {return lnk;} 159 vec sample() const { 160 vec smp ( rv.count() ); UniRNG.sample_vector ( rv.count(),smp ); 161 return low+distance*smp; 162 } 163 void set_parameters ( const vec &low0, const vec &high0 ) { 164 distance = high0-low0; 165 it_assert_debug ( min ( distance ) >0.0,"bad support" ); 166 low = low0; 167 high = high0; 168 nk = prod ( 1.0/distance ); 169 lnk = log ( nk ); 170 } 171 vec mean() const {vec pom=high; pom-=low; pom/=2.0; return pom;} 172 }; 173 174 175 /*! 176 \brief Normal distributed linear function with linear function of mean value; 177 178 Mean value $mu=A*rvc$. 179 */ 180 template<class sq_T> 100 181 class mlnorm : public mEF { 101 182 enorm<sq_T> epdf; 183 vec* _mu; //cached epdf.mu; 102 184 mat A; 103 185 public: 104 186 //! Constructor 105 mlnorm ( RV &rv,RV &rvc, mat &A, sq_T &R ); 187 mlnorm ( RV &rv,RV &rvc ); 188 void set_parameters ( const mat &A, const sq_T &R ); 106 189 //!Generate one sample of the posterior 107 190 vec samplecond ( vec &cond, double &lik ); 191 //!Generate matrix of samples of the posterior 108 192 mat samplecond ( vec &cond, vec &lik, int n ); 109 193 void condition ( vec &cond ); 110 194 }; 111 195 196 /*! 197 \brief Gamma random walk 198 199 Mean value, $\mu$, of this density is given by \c rvc . 200 Standard deviation of the random walk is proportional to one $k$-th the mean. 201 This is achieved by setting $\alpha=k$ and $\beta=k/\mu$. 202 203 The standard deviation of the walk is then: $\mu/\sqrt(k)$. 204 */ 205 class mgamma : public mEF { 206 egamma epdf; 207 double k; 208 vec* _beta; 209 210 public: 211 //! Constructor 212 mgamma ( const RV &rv,const RV &rvc ); 213 void set_parameters ( double k ); 214 //!Generate one sample of the posterior 215 vec samplecond ( vec &cond, double &lik ); 216 //!Generate matrix of samples of the posterior 217 mat samplecond ( vec &cond, vec &lik, int n ); 218 void condition ( const vec &val ) {*_beta=k/val;}; 219 }; 220 221 //! Switch between various resampling methods. 222 enum RESAMPLING_METHOD { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 }; 223 /*! 224 \brief Weighted empirical density 225 226 Used e.g. in particle filters. 227 */ 228 class eEmp: public epdf { 229 protected : 230 //! Number of particles 231 int n; 232 vec w; 233 Array<vec> samples; 234 public: 235 eEmp ( const RV &rv0 ,int n0) :epdf ( rv0 ),n(n0),w(n),samples(n) {}; 236 void set_parameters ( const vec &w0, epdf* pdf0 ); 237 //! Potentially dangerous, use with care. 238 vec& _w() {return w;}; 239 Array<vec>& _samples() {return samples;}; 240 //! Function performs resampling, i.e. removal of low-weight samples and duplication of high-weight samples such that the new samples represent the same density. 241 ivec resample ( RESAMPLING_METHOD method = SYSTEMATIC ); 242 vec sample() const {it_error ( "Not implemented" );return 0;} 243 double evalpdflog(const vec &val) const {it_error ( "Not implemented" );return 0.0;} 244 vec mean()const {vec pom=zeros(rv.count()); 245 for (int i=0;i<n;i++){pom+=samples(i)*w(i);} 246 return pom; 247 } 248 }; 249 250 112 251 //////////////////////// 113 252 114 253 template<class sq_T> 115 enorm<sq_T>::enorm ( RV &rv ) :eEF( ), mu ( rv.count() ),R(rv.count()),_iR(rv.count()),cached ( false ),dim ( rv.count() ) {};254 enorm<sq_T>::enorm ( RV &rv ) :eEF(rv), mu ( rv.count() ),R ( rv.count() ),_iR ( rv.count() ),cached ( false ),dim ( rv.count() ) {}; 116 255 117 256 template<class sq_T> … … 120 259 mu = mu0; 121 260 R = R0; 122 if (_iR.rows()!=R.rows()) _iR=R; // memory allocation!261 if ( _iR.rows() !=R.rows() ) _iR=R; // memory allocation! 123 262 R.inv ( _iR ); //update cache 124 263 cached=true; … … 136 275 137 276 template<class sq_T> 138 vec enorm<sq_T>::sample() {277 vec enorm<sq_T>::sample() const { 139 278 vec x ( dim ); 140 RNG.sample_vector ( dim,x );279 NorRNG.sample_vector ( dim,x ); 141 280 vec smp = R.sqrt_mult ( x ); 142 281 … … 146 285 147 286 template<class sq_T> 148 mat enorm<sq_T>::sample ( int N ) {287 mat enorm<sq_T>::sample ( int N )const { 149 288 mat X ( dim,N ); 150 289 vec x ( dim ); … … 153 292 154 293 for ( i=0;i<N;i++ ) { 155 RNG.sample_vector ( dim,x );294 NorRNG.sample_vector ( dim,x ); 156 295 pom = R.sqrt_mult ( x ); 157 296 pom +=mu; … … 163 302 164 303 template<class sq_T> 165 double enorm<sq_T>::eval ( const vec &val ) { 166 return exp ( evalpdflog ( val ) ); 167 }; 168 169 template<class sq_T> 170 double enorm<sq_T>::evalpdflog ( const vec &val ) { 171 if ( !cached ) {R.inv ( _iR );cached=true;} 172 173 return -0.5* ( R.cols() *0.79817986835811504957 +R.logdet() +_iR.qform ( mu-val ) ); 174 }; 175 176 177 template<class sq_T> 178 mlnorm<sq_T>::mlnorm ( RV &rv,RV &rvc, mat &A, sq_T &R ) { 179 int dim = rv.count(); 180 vec mu ( dim ); 181 182 epdf = enorm<sq_T> ( rv,mu,R ); 304 double enorm<sq_T>::eval ( const vec &val ) const { 305 double pdfl,e; 306 pdfl = evalpdflog ( val ); 307 e = exp ( pdfl ); 308 return e; 309 }; 310 311 template<class sq_T> 312 double enorm<sq_T>::evalpdflog ( const vec &val ) const { 313 if ( !cached ) {it_error("this should not happen, see cached");} 314 315 // 1.83787706640935 = log(2pi) 316 return -0.5* ( R.cols() * 1.83787706640935 +R.logdet() +_iR.qform ( mu-val ) ); 317 }; 318 319 320 template<class sq_T> 321 mlnorm<sq_T>::mlnorm ( RV &rv0,RV &rvc0 ) :mEF ( rv0,rvc0 ),epdf ( rv ),A ( rv0.count(),rv0.count() ) { 322 _mu = epdf._mu(); 323 } 324 325 template<class sq_T> 326 void mlnorm<sq_T>::set_parameters ( const mat &A0, const sq_T &R0 ) { 327 epdf.set_parameters ( zeros ( rv.count() ),R0 ); 328 A = A0; 183 329 } 184 330 … … 199 345 this->condition ( cond ); 200 346 201 for ( i=0; i< dim; i++ ) {347 for ( i=0; i<n; i++ ) { 202 348 smp = epdf.sample(); 203 349 lik ( i ) = epdf.eval ( smp ); … … 210 356 template<class sq_T> 211 357 void mlnorm<sq_T>::condition ( vec &cond ) { 212 epdf.mu = A*cond;358 *_mu = A*cond; 213 359 //R is already assigned; 214 360 } … … 216 362 /////////// 217 363 218 //#ifdef HAVE_EXTERN_TEMPLATE219 220 // extern template class enorm<fsqmat>;221 // extern template class enorm<ldmat>;222 //#endif223 364 224 365 #endif //EF_H -
TabularUnified doc/html/annotated.html ¶
r28 r32 24 24 <tr><td class="indexkey"><a class="el" href="classbilinfn.html">bilinfn</a></td><td class="indexvalue">Class representing function $f(x,u) = Ax+Bu$ </td></tr> 25 25 <tr><td class="indexkey"><a class="el" href="classBM.html">BM</a></td><td class="indexvalue">Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities </td></tr> 26 <tr><td class="indexkey"><a class="el" href="classBMcond.html">BMcond</a></td><td class="indexvalue">Conditional Bayesian Filter </td></tr> 26 27 <tr><td class="indexkey"><a class="el" href="classconstfn.html">constfn</a></td><td class="indexvalue">Class representing function $f(x) = a$, here rv is empty </td></tr> 27 28 <tr><td class="indexkey"><a class="el" href="classdiffbifn.html">diffbifn</a></td><td class="indexvalue">Class representing a differentiable function of two variables $f(x,u)$ </td></tr> 28 29 <tr><td class="indexkey"><a class="el" href="classDS.html">DS</a></td><td class="indexvalue">Abstract class for discrete-time sources of data </td></tr> 29 30 <tr><td class="indexkey"><a class="el" href="classeEF.html">eEF</a></td><td class="indexvalue">General conjugate exponential family posterior density </td></tr> 31 <tr><td class="indexkey"><a class="el" href="classeEmp.html">eEmp</a></td><td class="indexvalue">Weighted empirical density </td></tr> 32 <tr><td class="indexkey"><a class="el" href="classegamma.html">egamma</a></td><td class="indexvalue">Gamma posterior density </td></tr> 30 33 <tr><td class="indexkey"><a class="el" href="classEKF.html">EKF< sq_T ></a></td><td class="indexvalue">Extended <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> Filter </td></tr> 34 <tr><td class="indexkey"><a class="el" href="classemix.html">emix</a></td><td class="indexvalue">Weighted mixture of epdfs with external owned components </td></tr> 31 35 <tr><td class="indexkey"><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td class="indexvalue">Gaussian density with positive definite (decomposed) covariance matrix </td></tr> 32 36 <tr><td class="indexkey"><a class="el" href="classepdf.html">epdf</a></td><td class="indexvalue">Probability density function with numerical statistics, e.g. posterior density </td></tr> 37 <tr><td class="indexkey"><a class="el" href="classeuni.html">euni</a></td><td class="indexvalue">Uniform distributed density on a rectangular support </td></tr> 33 38 <tr><td class="indexkey"><a class="el" href="classfnc.html">fnc</a></td><td class="indexvalue">Class representing function $f(x)$ of variable $x$ represented by <code>rv</code> </td></tr> 34 39 <tr><td class="indexkey"><a class="el" href="classfsqmat.html">fsqmat</a></td><td class="indexvalue">Fake <a class="el" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a>. This class maps <a class="el" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> operations to operations on full matrix </td></tr> 40 <tr><td class="indexkey"><a class="el" href="classitpp_1_1Gamma__RNG.html">itpp::Gamma_RNG</a></td><td class="indexvalue">Gamma distribution </td></tr> 35 41 <tr><td class="indexkey"><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td class="indexvalue"><a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with covariance matrices in square root form </td></tr> 36 42 <tr><td class="indexkey"><a class="el" href="classKalmanFull.html">KalmanFull</a></td><td class="indexvalue">Basic <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with full matrices (education purpose only)! Will be deleted soon! </td></tr> 43 <tr><td class="indexkey"><a class="el" href="classKFcondQR.html">KFcondQR</a></td><td class="indexvalue"><a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> Filter with conditional diagonal matrices R and Q </td></tr> 37 44 <tr><td class="indexkey"><a class="el" href="classlinfn.html">linfn</a></td><td class="indexvalue">Class representing function $f(x) = Ax+B$ </td></tr> 38 45 <tr><td class="indexkey"><a class="el" href="classMemDS.html">MemDS</a></td><td class="indexvalue">Class representing off-line data stored in memory </td></tr> 46 <tr><td class="indexkey"><a class="el" href="classmgamma.html">mgamma</a></td><td class="indexvalue">Gamma random walk </td></tr> 47 <tr><td class="indexkey"><a class="el" href="classmlnorm.html">mlnorm< sq_T ></a></td><td class="indexvalue">Normal distributed linear function with linear function of mean value; </td></tr> 39 48 <tr><td class="indexkey"><a class="el" href="classmpdf.html">mpdf</a></td><td class="indexvalue">Conditional probability density, e.g. modeling some dependencies </td></tr> 40 <tr><td class="indexkey"><a class="el" href="classPF.html">PF</a></td><td class="indexvalue">A Particle Filter prototype </td></tr> 49 <tr><td class="indexkey"><a class="el" href="classMPF.html">MPF< BM_T ></a></td><td class="indexvalue">Marginalized Particle filter </td></tr> 50 <tr><td class="indexkey"><a class="el" href="classPF.html">PF</a></td><td class="indexvalue">Trivial particle filter with proposal density equal to parameter evolution model </td></tr> 41 51 <tr><td class="indexkey"><a class="el" href="classRV.html">RV</a></td><td class="indexvalue">Class representing variables, most often random variables </td></tr> 42 52 <tr><td class="indexkey"><a class="el" href="classsqmat.html">sqmat</a></td><td class="indexvalue">Virtual class for representation of double symmetric matrices in square-root form </td></tr> 43 <tr><td class="indexkey"><a class="el" href="classTrivialPF.html">TrivialPF</a></td><td class="indexvalue">Trivial particle filter with proposal density that is not conditioned on the data </td></tr>44 53 </table> 45 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 54 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 46 55 <a href="http://www.doxygen.org/index.html"> 47 56 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classBM-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>BM Member List</h1>This is the complete list of members for <a class="el" href="classBM.html">BM</a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classBM.html# a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr>24 <tr class="memlist"><td><a class="el" href="classBM.html#3dc45554556926bde996a267636abe55">_epdf</a>()=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [pure virtual]</code></td></tr> 25 25 <tr class="memlist"><td><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">bayes</a>(const vec &dt)=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [pure virtual]</code></td></tr> 26 26 <tr class="memlist"><td><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">bayes</a>(mat Dt)</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 27 <tr class="memlist"><td><a class="el" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae">BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 29 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 30 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 27 <tr class="memlist"><td><a class="el" href="classBM.html#605d28b426adb677c86a57ddb525132a">BM</a>(const RV &rv0)</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 29 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 30 <tr class="memlist"><td><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 31 <tr class="memlist"><td><a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">~BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline, virtual]</code></td></tr> 32 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 31 33 <a href="http://www.doxygen.org/index.html"> 32 34 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classBM.html ¶
r28 r32 31 31 <p><center><img src="classBM__inherit__graph.png" border="0" usemap="#BM__inherit__map" alt="Inheritance graph"></center> 32 32 <map name="BM__inherit__map"> 33 <area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="5,87,133,113"><area shape="rect" href="classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="47,183,193,209"><area shape="rect" href="classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted..." alt="" coords="208,87,299,113"><area shape="rect" href="classPF.html" title="A Particle Filter prototype." alt="" coords="323,87,360,113"><area shape="rect" title="\< fsqmat \>" alt="" coords="64,111,72,119"><area shape="rect" title="\< fsqmat \>" alt="" coords="95,179,103,187"><area shape="rect" href="classEKF.html" title="Extended Kalman Filter." alt="" coords="68,263,172,289"><area shape="rect" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data..." alt="" coords="305,183,377,209"></map> 33 <area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="47,87,175,113"><area shape="rect" href="classKalman.html" title="Kalman\< ldmat \>" alt="" coords="49,183,185,209"><area shape="rect" href="classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model..." alt="" coords="249,87,287,113"><area shape="rect" title="\< ldmat \>" alt="" coords="108,111,116,119"><area shape="rect" title="\< ldmat \>" alt="" coords="112,179,120,187"><area shape="rect" href="classEKF.html" title="Extended Kalman Filter." alt="" coords="5,263,109,289"><area shape="rect" href="classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="133,263,221,289"><area shape="rect" href="classMPF.html" title="Marginalized Particle filter." alt="" coords="211,183,325,209"></map> 34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 <div class="dynheader"> 36 Collaboration diagram for BM:</div> 37 <div class="dynsection"> 38 <p><center><img src="classBM__coll__graph.png" border="0" usemap="#BM__coll__map" alt="Collaboration graph"></center> 39 <map name="BM__coll__map"> 40 <area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="8,7,45,33"><area shape="rect" title="rv" alt="" coords="23,31,31,39"><area shape="rect" title="rv" alt="" coords="23,99,31,107"></map> 34 41 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 42 … … 38 45 <tr><td></td></tr> 39 46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 40 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" ef32a12f4f89e4000bf5390ceda762ae"></a><!-- doxytag: member="BM::BM" ref="ef32a12f4f89e4000bf5390ceda762ae" args="()" -->41 </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html# ef32a12f4f89e4000bf5390ceda762ae">BM</a> ()</td></tr>47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="605d28b426adb677c86a57ddb525132a"></a><!-- doxytag: member="BM::BM" ref="605d28b426adb677c86a57ddb525132a" args="(const RV &rv0)" --> 48 </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#605d28b426adb677c86a57ddb525132a">BM</a> (const <a class="el" href="classRV.html">RV</a> &rv0)</td></tr> 42 49 43 50 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> … … 49 56 50 57 <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" a5b8f6c8a872738cfaa30ab010e8c077"></a><!-- doxytag: member="BM::_epdf" ref="a5b8f6c8a872738cfaa30ab010e8c077" args="()" -->52 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a> ()</td></tr>58 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3dc45554556926bde996a267636abe55"></a><!-- doxytag: member="BM::_epdf" ref="3dc45554556926bde996a267636abe55" args="()=0" --> 59 virtual <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#3dc45554556926bde996a267636abe55">_epdf</a> ()=0</td></tr> 53 60 54 61 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr> 55 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> 62 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ca0f02b3b4144e0895cc14f7e0374bdd"></a><!-- doxytag: member="BM::~BM" ref="ca0f02b3b4144e0895cc14f7e0374bdd" args="()" --> 63 virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">~BM</a> ()</td></tr> 64 65 <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> 66 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af00f0612fabe66241dd507188cdbf88"></a><!-- doxytag: member="BM::rv" ref="af00f0612fabe66241dd507188cdbf88" args="" --> 68 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td></tr> 69 70 <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> 56 71 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="BM::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" --> 57 72 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr> … … 90 105 </dl> 91 106 107 <p>Implemented in <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< sq_T ></a>, <a class="el" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7">EKF< sq_T ></a>, <a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">PF</a>, <a class="el" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623">MPF< BM_T ></a>, and <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< ldmat ></a>.</p> 108 92 109 </div> 93 110 </div><p> 94 111 <hr>The documentation for this class was generated from the following file:<ul> 95 112 <li>work/mixpp/bdm/stat/<a class="el" href="libBM_8h-source.html">libBM.h</a></ul> 96 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:402008 for mixpp by 113 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 97 114 <a href="http://www.doxygen.org/index.html"> 98 115 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classBM__inherit__graph.map ¶
r23 r32 1 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords=" 5,87,133,113">2 <area shape="rect" href="$classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="47,183,193,209">3 <area shape="rect" href="$class KalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted..." alt="" coords="208,87,299,113">4 <area shape="rect" href="$classPF.html" title="A Particle Filter prototype." alt="" coords="323,87,360,113">5 <area shape="rect" title="\< fsqmat \>" alt="" coords="64,111,72,119">6 <area shape="rect" title="\< fsqmat \>" alt="" coords="95,179,103,187">7 <area shape="rect" href="$class EKF.html" title="Extended Kalman Filter." alt="" coords="68,263,172,289">8 <area shape="rect" href="$class TrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data..." alt="" coords="305,183,377,209">1 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="47,87,175,113"> 2 <area shape="rect" href="$classKalman.html" title="Kalman\< ldmat \>" alt="" coords="49,183,185,209"> 3 <area shape="rect" href="$classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model..." alt="" coords="249,87,287,113"> 4 <area shape="rect" title="\< ldmat \>" alt="" coords="108,111,116,119"> 5 <area shape="rect" title="\< ldmat \>" alt="" coords="112,179,120,187"> 6 <area shape="rect" href="$classEKF.html" title="Extended Kalman Filter." alt="" coords="5,263,109,289"> 7 <area shape="rect" href="$classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="133,263,221,289"> 8 <area shape="rect" href="$classMPF.html" title="Marginalized Particle filter." alt="" coords="211,183,325,209"> -
TabularUnified doc/html/classBM__inherit__graph.md5 ¶
r23 r32 1 09290a43928c25020995e8eec85fd9e3 1 a493f13403a1fdc9e18ef6dd14c8788c -
TabularUnified doc/html/classDS-members.html ¶
r28 r32 30 30 <tr class="memlist"><td><a class="el" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039">write</a>(vec &ut)</td><td><a class="el" href="classDS.html">DS</a></td><td></td></tr> 31 31 <tr class="memlist"><td><a class="el" href="classDS.html#f4ae51a3bc1267a6a52fc229973afe85">write</a>(vec &ut, ivec &indeces)</td><td><a class="el" href="classDS.html">DS</a></td><td></td></tr> 32 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:412008 for mixpp by 32 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 33 33 <a href="http://www.doxygen.org/index.html"> 34 34 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classDS.html ¶
r28 r32 117 117 <hr>The documentation for this class was generated from the following file:<ul> 118 118 <li>work/mixpp/bdm/stat/<a class="el" href="libBM_8h-source.html">libBM.h</a></ul> 119 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:412008 for mixpp by 119 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 120 120 <a href="http://www.doxygen.org/index.html"> 121 121 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classEKF-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>EKF< sq_T > Member List</h1>This is the complete list of members for <a class="el" href="classEKF.html">EKF< sq_T ></a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 25 <tr bgcolor="#f0f0f0"><td><b>_iRy</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 26 <tr bgcolor="#f0f0f0"><td><b>_K</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 27 <tr bgcolor="#f0f0f0"><td><b>_Ry</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 28 <tr bgcolor="#f0f0f0"><td><b>_yp</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 29 <tr bgcolor="#f0f0f0"><td><b>A</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 30 <tr bgcolor="#f0f0f0"><td><b>B</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 31 <tr class="memlist"><td><a class="el" href="classEKF.html#fb0a08463f14e5584344ea2df99fe747">bayes</a>(const vec &dt, bool evalll=true)</td><td><a class="el" href="classEKF.html">EKF< sq_T ></a></td><td><code> [inline]</code></td></tr> 32 <tr class="memlist"><td><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM::bayes</a>(const vec &dt)=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [pure virtual]</code></td></tr> 24 <tr class="memlist"><td><a class="el" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4">_epdf</a>()</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [inline, virtual]</code></td></tr> 25 <tr bgcolor="#f0f0f0"><td><b>_iP</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 26 <tr bgcolor="#f0f0f0"><td><b>_iRy</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 27 <tr bgcolor="#f0f0f0"><td><b>_K</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 28 <tr bgcolor="#f0f0f0"><td><b>_mu</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 29 <tr bgcolor="#f0f0f0"><td><b>_P</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 30 <tr bgcolor="#f0f0f0"><td><b>_Ry</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 31 <tr bgcolor="#f0f0f0"><td><b>_yp</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 32 <tr bgcolor="#f0f0f0"><td><b>A</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 33 <tr bgcolor="#f0f0f0"><td><b>B</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 34 <tr class="memlist"><td><a class="el" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7">bayes</a>(const vec &dt)</td><td><a class="el" href="classEKF.html">EKF< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 33 35 <tr class="memlist"><td><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">BM::bayes</a>(mat Dt)</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 34 <tr class="memlist"><td><a class="el" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae">BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 35 <tr bgcolor="#f0f0f0"><td><b>C</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 36 <tr bgcolor="#f0f0f0"><td><b>D</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 37 <tr bgcolor="#f0f0f0"><td><b>dimu</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 38 <tr bgcolor="#f0f0f0"><td><b>dimx</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 39 <tr bgcolor="#f0f0f0"><td><b>dimy</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 40 <tr class="memlist"><td><a class="el" href="classEKF.html#003687c6cf2a01be90a00e2c99e3863e">EKF</a>(diffbifn *pfxu, diffbifn *phxu, sq_T Q0, sq_T R0, vec mu0, mat P0)</td><td><a class="el" href="classEKF.html">EKF< sq_T ></a></td><td><code> [inline]</code></td></tr> 41 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 42 <tr class="memlist"><td><a class="el" href="classKalman.html#96958a5ebfa966d892137987f265083a">Kalman</a>(int dimx, int dimu, int dimy)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td></td></tr> 43 <tr class="memlist"><td><a class="el" href="classKalman.html#83118f4bd2ecbc70b03cfd573088ed6f">Kalman</a>(mat A0, mat B0, mat C0, mat D0, fsqmatR0, fsqmatQ0, fsqmatP0, vec mu0)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td></td></tr> 44 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 45 <tr class="memlist"><td><a class="el" href="classKalman.html#3063a3f58a74cea672ae889971012eed">mu</a></td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td></td></tr> 46 <tr bgcolor="#f0f0f0"><td><b>operator<<</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [friend]</code></td></tr> 47 <tr class="memlist"><td><a class="el" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3">P</a></td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td></td></tr> 48 <tr bgcolor="#f0f0f0"><td><b>Q</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 49 <tr bgcolor="#f0f0f0"><td><b>R</b> (defined in <a class="el" href="classKalman.html">Kalman< fsqmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< fsqmat ></a></td><td><code> [protected]</code></td></tr> 50 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:43 2008 for mixpp by 36 <tr class="memlist"><td><a class="el" href="classBM.html#605d28b426adb677c86a57ddb525132a">BM</a>(const RV &rv0)</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 37 <tr bgcolor="#f0f0f0"><td><b>C</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 38 <tr bgcolor="#f0f0f0"><td><b>D</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 39 <tr bgcolor="#f0f0f0"><td><b>dimu</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 40 <tr bgcolor="#f0f0f0"><td><b>dimx</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 41 <tr bgcolor="#f0f0f0"><td><b>dimy</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 42 <tr class="memlist"><td><a class="el" href="classEKF.html#ea4f3254cacf0a92d2a820b1201d049e">EKF</a>(RV rvx, RV rvy, RV rvu)</td><td><a class="el" href="classEKF.html">EKF< sq_T ></a></td><td><code> [inline]</code></td></tr> 43 <tr class="memlist"><td><a class="el" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424">est</a></td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 44 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 45 <tr class="memlist"><td><a class="el" href="classKalman.html#e580ab06483952bd03f2e651763e184f">fy</a></td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 46 <tr class="memlist"><td><a class="el" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3">Kalman</a>(RV rvx0, RV rvy0, RV rvu0)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td></td></tr> 47 <tr class="memlist"><td><a class="el" href="classKalman.html#ce38e31810aea4db45a83ad05eaba009">Kalman</a>(const Kalman< ldmat > &K0)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td></td></tr> 48 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 49 <tr bgcolor="#f0f0f0"><td><b>Q</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 50 <tr bgcolor="#f0f0f0"><td><b>R</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 51 <tr class="memlist"><td><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 52 <tr bgcolor="#f0f0f0"><td><b>rvu</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 53 <tr bgcolor="#f0f0f0"><td><b>rvy</b> (defined in <a class="el" href="classKalman.html">Kalman< ldmat ></a>)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [protected]</code></td></tr> 54 <tr class="memlist"><td><a class="el" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0">set_est</a>(const vec &mu0, const ldmat &P0)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td><code> [inline]</code></td></tr> 55 <tr bgcolor="#f0f0f0"><td><b>set_parameters</b>(diffbifn *pfxu, diffbifn *phxu, const sq_T Q0, const sq_T R0) (defined in <a class="el" href="classEKF.html">EKF< sq_T ></a>)</td><td><a class="el" href="classEKF.html">EKF< sq_T ></a></td><td><code> [inline]</code></td></tr> 56 <tr class="memlist"><td><a class="el" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a">Kalman< ldmat >::set_parameters</a>(const mat &A0, const mat &B0, const mat &C0, const mat &D0, const ldmat &R0, const ldmat &Q0)</td><td><a class="el" href="classKalman.html">Kalman< ldmat ></a></td><td></td></tr> 57 <tr class="memlist"><td><a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">~BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline, virtual]</code></td></tr> 58 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:47 2008 for mixpp by 51 59 <a href="http://www.doxygen.org/index.html"> 52 60 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classEKF.html ¶
r28 r32 21 21 </ul> 22 22 </div> 23 <h1>EKF< sq_T > Class Template Reference</h1><!-- doxytag: class="EKF" --><!-- doxytag: inherits="Kalman< fsqmat >" -->Extended <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> Filter.23 <h1>EKF< sq_T > Class Template Reference</h1><!-- doxytag: class="EKF" --><!-- doxytag: inherits="Kalman< ldmat >" -->Extended <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> Filter. 24 24 <a href="#_details">More...</a> 25 25 <p> … … 31 31 <p><center><img src="classEKF__inherit__graph.png" border="0" usemap="#EKF_3_01sq__T_01_4__inherit__map" alt="Inheritance graph"></center> 32 32 <map name="EKF_3_01sq__T_01_4__inherit__map"> 33 <area shape="rect" href="classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="5,183,152,209"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="69,7,112,33"><area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="95,87,223,113"><area shape="rect" title="\< fsqmat \>" alt="" coords="143,111,151,119"><area shape="rect" title="\< fsqmat \>" alt="" coords="85,179,93,187"></map>33 <area shape="rect" href="classKalman.html" title="Kalman\< ldmat \>" alt="" coords="5,183,141,209"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="64,7,107,33"><area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="89,87,217,113"><area shape="rect" title="\< ldmat \>" alt="" coords="137,111,145,119"><area shape="rect" title="\< ldmat \>" alt="" coords="80,179,88,187"></map> 34 34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 35 <div class="dynheader"> … … 38 38 <p><center><img src="classEKF__coll__graph.png" border="0" usemap="#EKF_3_01sq__T_01_4__coll__map" alt="Collaboration graph"></center> 39 39 <map name="EKF_3_01sq__T_01_4__coll__map"> 40 <area shape="rect" href="classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="61,337,208,364"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,7,48,33"><area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="48,172,176,199"><area shape="rect" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix." alt="" coords="200,172,267,199"><area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="229,196,237,204"><area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="164,333,172,341"><area shape="rect" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form..." alt="" coords="203,7,264,33"><area shape="rect" title="\< fsqmat \>" alt="" coords="109,196,117,204"><area shape="rect" title="\< fsqmat \>" alt="" coords="127,333,135,341"><area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="108,31,116,39"><area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="108,168,116,176"><area shape="rect" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$." alt="" coords="277,337,344,364"><area shape="rect" title="pfxu\nphxu" alt="" coords="299,361,307,369"><area shape="rect" title="pfxu\nphxu" alt="" coords="252,445,260,453"><area shape="rect" href="classfnc.html" title="Class representing function $f(x)$ of variable $x$ represented by rv." alt="" coords="291,172,331,199"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="355,172,392,199"><area shape="rect" title="rvu\nrvx" alt="" coords="365,196,373,204"><area shape="rect" title="rvu\nrvx" alt="" coords="313,333,321,341"></map>40 <area shape="rect" href="classKalman.html" title="Kalman\< ldmat \>" alt="" coords="300,636,436,663"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="339,231,381,257"><area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="201,412,329,439"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="344,7,381,33"><area shape="rect" title="rvu\nrvy" alt="" coords="372,31,380,39"><area shape="rect" title="rvu\nrvy" alt="" coords="375,632,383,640"><area shape="rect" title="rv" alt="" coords="359,31,367,39"><area shape="rect" title="rv" alt="" coords="356,227,364,235"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="177,119,228,145"><area shape="rect" title="rv" alt="" coords="340,21,348,29"><area shape="rect" title="rv" alt="" coords="208,115,216,123"><area shape="rect" title="rvu\nrvy" alt="" coords="356,31,364,39"><area shape="rect" title="rvu\nrvy" alt="" coords="268,408,276,416"><area shape="rect" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$." alt="" coords="456,119,523,145"><area shape="rect" title="rvu\nrvx" alt="" coords="379,24,387,32"><area shape="rect" title="rvu\nrvx" alt="" coords="477,115,485,123"><area shape="rect" href="classenorm.html" title="enorm\< ldmat \>" alt="" coords="85,524,216,551"><area shape="rect" title="est\nfy" alt="" coords="157,548,165,556"><area shape="rect" title="est\nfy" alt="" coords="296,635,304,643"><area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="140,231,185,257"><area shape="rect" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="5,412,125,439"><area shape="rect" title="\< ldmat \>" alt="" coords="60,436,68,444"><area shape="rect" title="\< ldmat \>" alt="" coords="105,520,113,528"><area shape="rect" title="_iR\nR" alt="" coords="225,255,233,263"><area shape="rect" title="_iR\nR" alt="" coords="93,408,101,416"><area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="235,255,243,263"><area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="259,408,267,416"><area shape="rect" title="\< ldmat \>" alt="" coords="261,436,269,444"><area shape="rect" title="\< ldmat \>" alt="" coords="347,632,355,640"><area shape="rect" title="pfxu\nphxu" alt="" coords="484,143,492,151"><area shape="rect" title="pfxu\nphxu" alt="" coords="451,712,459,720"><area shape="rect" href="classfnc.html" title="Class representing function $f(x)$ of variable $x$ represented by rv." alt="" coords="484,7,524,33"></map> 41 41 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 42 42 … … 45 45 <tr><td></td></tr> 46 46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 003687c6cf2a01be90a00e2c99e3863e"></a><!-- doxytag: member="EKF::EKF" ref="003687c6cf2a01be90a00e2c99e3863e" args="(diffbifn *pfxu, diffbifn *phxu, sq_T Q0, sq_T R0, vec mu0, mat P0)" -->48 </td><td class="memItemRight" valign="bottom"><a class="el" href="classEKF.html# 003687c6cf2a01be90a00e2c99e3863e">EKF</a> (<a class="el" href="classdiffbifn.html">diffbifn</a> *pfxu, <a class="el" href="classdiffbifn.html">diffbifn</a> *phxu, sq_T Q0, sq_T R0, vec mu0, mat P0)</td></tr>47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ea4f3254cacf0a92d2a820b1201d049e"></a><!-- doxytag: member="EKF::EKF" ref="ea4f3254cacf0a92d2a820b1201d049e" args="(RV rvx, RV rvy, RV rvu)" --> 48 </td><td class="memItemRight" valign="bottom"><a class="el" href="classEKF.html#ea4f3254cacf0a92d2a820b1201d049e">EKF</a> (<a class="el" href="classRV.html">RV</a> rvx, <a class="el" href="classRV.html">RV</a> rvy, <a class="el" href="classRV.html">RV</a> rvu)</td></tr> 49 49 50 50 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb0a08463f14e5584344ea2df99fe747"></a><!-- doxytag: member="EKF::bayes" ref="fb0a08463f14e5584344ea2df99fe747" args="(const vec &dt, bool evalll=true)" --> 52 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classEKF.html#fb0a08463f14e5584344ea2df99fe747">bayes</a> (const vec &dt, bool <a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a>=true)</td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="28d058ae4d24d992d2f055419a06ee66"></a><!-- doxytag: member="EKF::set_parameters" ref="28d058ae4d24d992d2f055419a06ee66" args="(diffbifn *pfxu, diffbifn *phxu, const sq_T Q0, const sq_T R0)" --> 52 void </td><td class="memItemRight" valign="bottom"><b>set_parameters</b> (<a class="el" href="classdiffbifn.html">diffbifn</a> *pfxu, <a class="el" href="classdiffbifn.html">diffbifn</a> *phxu, const sq_T Q0, const sq_T R0)</td></tr> 53 54 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c79c62c9b3e0b56b3aaa1b6f1d9a7af7"></a><!-- doxytag: member="EKF::bayes" ref="c79c62c9b3e0b56b3aaa1b6f1d9a7af7" args="(const vec &dt)" --> 55 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7">bayes</a> (const vec &dt)</td></tr> 53 56 54 57 <tr><td class="mdescLeft"> </td><td class="mdescRight">Here dt = [yt;ut] of appropriate dimensions. <br></td></tr> 55 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">bayes</a> (const vec &dt)=0</td></tr> 58 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="239b28a0380946f5749b2f8d2807f93a"></a><!-- doxytag: member="EKF::set_parameters" ref="239b28a0380946f5749b2f8d2807f93a" args="(const mat &A0, const mat &B0, const mat &C0, const mat &D0, const ldmat &R0, const ldmat &Q0)" --> 59 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a">set_parameters</a> (const mat &A0, const mat &B0, const mat &C0, const mat &D0, const ldmat &R0, const ldmat &Q0)</td></tr> 56 60 57 <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#a892eff438aab2dd1a9e2efcb7fb5bdf"></a><br></td></tr> 61 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set parameters with check of relevance. <br></td></tr> 62 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80bcf29466d9a9dd2b8f74699807d0c0"></a><!-- doxytag: member="EKF::set_est" ref="80bcf29466d9a9dd2b8f74699807d0c0" args="(const vec &mu0, const ldmat &P0)" --> 63 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0">set_est</a> (const vec &mu0, const ldmat &P0)</td></tr> 64 65 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set estimate values, used e.g. in initialization. <br></td></tr> 58 66 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87b07867fd4c133aa89a18543f68d9f9"></a><!-- doxytag: member="EKF::bayes" ref="87b07867fd4c133aa89a18543f68d9f9" args="(mat Dt)" --> 59 67 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">bayes</a> (mat Dt)</td></tr> 60 68 61 69 <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> 62 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a 5b8f6c8a872738cfaa30ab010e8c077"></a><!-- doxytag: member="EKF::_epdf" ref="a5b8f6c8a872738cfaa30ab010e8c077" args="()" -->63 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a> ()</td></tr>70 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a213c57aef55b2645e550bed81cfc0d4"></a><!-- doxytag: member="EKF::_epdf" ref="a213c57aef55b2645e550bed81cfc0d4" args="()" --> 71 <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4">_epdf</a> ()</td></tr> 64 72 65 73 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr> 66 <tr><td colspan="2"><br><h2>P ublicAttributes</h2></td></tr>67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 3063a3f58a74cea672ae889971012eed"></a><!-- doxytag: member="EKF::mu" ref="3063a3f58a74cea672ae889971012eed" args="" -->68 vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#3063a3f58a74cea672ae889971012eed">mu</a></td></tr>74 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7501230c2fafa3655887d2da23b3184c"></a><!-- doxytag: member="EKF::rvy" ref="7501230c2fafa3655887d2da23b3184c" args="" --> 76 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>rvy</b></td></tr> 69 77 70 <tr><td class="mdescLeft"> </td><td class="mdescRight">Mean value of the posterior density. <br></td></tr> 71 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="188cd5ac1c9e496b1a371eb7c57c97d3"></a><!-- doxytag: member="EKF::P" ref="188cd5ac1c9e496b1a371eb7c57c97d3" args="" --> 72 <a class="el" href="classfsqmat.html">fsqmat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3">P</a></td></tr> 78 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="44a16ffd5ac1e6e39bae34fea9e1e498"></a><!-- doxytag: member="EKF::rvu" ref="44a16ffd5ac1e6e39bae34fea9e1e498" args="" --> 79 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>rvu</b></td></tr> 73 80 74 <tr><td class="mdescLeft"> </td><td class="mdescRight">Mean value of the posterior density. <br></td></tr>75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="EKF::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" -->76 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr>77 78 <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr>79 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="EKF::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" -->80 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr>81 82 <tr><td class="mdescLeft"> </td><td class="mdescRight">If true, the filter will compute likelihood of the data record and store it in <code>ll</code> . Set to false if you want to save time. <br></td></tr>83 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>84 81 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39c8c403b46fa3b8c7da77cb2e3729eb"></a><!-- doxytag: member="EKF::dimx" ref="39c8c403b46fa3b8c7da77cb2e3729eb" args="" --> 85 82 int </td><td class="memItemRight" valign="bottom"><b>dimx</b></td></tr> … … 104 101 105 102 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="11d171dc0e0ab111c56a70f98b97b3ec"></a><!-- doxytag: member="EKF::R" ref="11d171dc0e0ab111c56a70f98b97b3ec" args="" --> 106 <a class="el" href="classfsqmat.html">fsqmat</a> </td><td class="memItemRight" valign="bottom"><b>R</b></td></tr>103 ldmat </td><td class="memItemRight" valign="bottom"><b>R</b></td></tr> 107 104 108 105 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9b69015c800eb93f3ee49da23a6f55d9"></a><!-- doxytag: member="EKF::Q" ref="9b69015c800eb93f3ee49da23a6f55d9" args="" --> 109 <a class="el" href="classfsqmat.html">fsqmat</a> </td><td class="memItemRight" valign="bottom"><b>Q</b></td></tr>106 ldmat </td><td class="memItemRight" valign="bottom"><b>Q</b></td></tr> 110 107 108 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5568c74bac67ae6d3b1061dba60c9424"></a><!-- doxytag: member="EKF::est" ref="5568c74bac67ae6d3b1061dba60c9424" args="" --> 109 <a class="el" href="classenorm.html">enorm</a>< ldmat > </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424">est</a></td></tr> 110 111 <tr><td class="mdescLeft"> </td><td class="mdescRight">posterior density on $x_t$ <br></td></tr> 112 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e580ab06483952bd03f2e651763e184f"></a><!-- doxytag: member="EKF::fy" ref="e580ab06483952bd03f2e651763e184f" args="" --> 113 <a class="el" href="classenorm.html">enorm</a>< ldmat > </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#e580ab06483952bd03f2e651763e184f">fy</a></td></tr> 114 115 <tr><td class="mdescLeft"> </td><td class="mdescRight">preditive density on $y_t$ <br></td></tr> 111 116 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d422f51467c7a06174af2476d2826132"></a><!-- doxytag: member="EKF::_K" ref="d422f51467c7a06174af2476d2826132" args="" --> 112 117 mat </td><td class="memItemRight" valign="bottom"><b>_K</b></td></tr> 113 118 114 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 30b7461989185d3d02cf42b8e2a37649"></a><!-- doxytag: member="EKF::_yp" ref="30b7461989185d3d02cf42b8e2a37649" args="" -->115 vec </td><td class="memItemRight" valign="bottom"><b>_yp</b></td></tr>119 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5188eb0329f8561f0b357af329769bf8"></a><!-- doxytag: member="EKF::_yp" ref="5188eb0329f8561f0b357af329769bf8" args="" --> 120 vec * </td><td class="memItemRight" valign="bottom"><b>_yp</b></td></tr> 116 121 117 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 477dca07d91ea1a1f41d51bb0229934f"></a><!-- doxytag: member="EKF::_Ry" ref="477dca07d91ea1a1f41d51bb0229934f" args="" -->118 <a class="el" href="classfsqmat.html">fsqmat</a> </td><td class="memItemRight" valign="bottom"><b>_Ry</b></td></tr>122 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17dd745daa8a958035a334a56fa4674"></a><!-- doxytag: member="EKF::_Ry" ref="e17dd745daa8a958035a334a56fa4674" args="" --> 123 ldmat * </td><td class="memItemRight" valign="bottom"><b>_Ry</b></td></tr> 119 124 120 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 15f1a793210750a7e4642fcd948b24c5"></a><!-- doxytag: member="EKF::_iRy" ref="15f1a793210750a7e4642fcd948b24c5" args="" -->121 <a class="el" href="classfsqmat.html">fsqmat</a> </td><td class="memItemRight" valign="bottom"><b>_iRy</b></td></tr>125 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fbbdf31365f5a5674099599200ea193b"></a><!-- doxytag: member="EKF::_iRy" ref="fbbdf31365f5a5674099599200ea193b" args="" --> 126 ldmat * </td><td class="memItemRight" valign="bottom"><b>_iRy</b></td></tr> 122 127 123 <tr><td colspan="2"><br><h2>Friends</h2></td></tr> 124 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="86ba216243ed95bb46d80d88775d16af"></a><!-- doxytag: member="EKF::operator<<" ref="86ba216243ed95bb46d80d88775d16af" args="(std::ostream &os, const KalmanFull &kf)" --> 125 std::ostream & </td><td class="memItemRight" valign="bottom"><b>operator<<</b> (std::ostream &os, const <a class="el" href="classKalmanFull.html">KalmanFull</a> &kf)</td></tr> 128 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d1f669b5b3421a070cc75d77b55ba734"></a><!-- doxytag: member="EKF::_mu" ref="d1f669b5b3421a070cc75d77b55ba734" args="" --> 129 vec * </td><td class="memItemRight" valign="bottom"><b>_mu</b></td></tr> 126 130 131 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3388218567128a797e69b109138271d"></a><!-- doxytag: member="EKF::_P" ref="b3388218567128a797e69b109138271d" args="" --> 132 ldmat * </td><td class="memItemRight" valign="bottom"><b>_P</b></td></tr> 133 134 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8bb7f870d69993493ba67ce40e7c3e9"></a><!-- doxytag: member="EKF::_iP" ref="b8bb7f870d69993493ba67ce40e7c3e9" args="" --> 135 ldmat * </td><td class="memItemRight" valign="bottom"><b>_iP</b></td></tr> 136 137 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af00f0612fabe66241dd507188cdbf88"></a><!-- doxytag: member="EKF::rv" ref="af00f0612fabe66241dd507188cdbf88" args="" --> 138 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td></tr> 139 140 <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> 141 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="EKF::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" --> 142 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr> 143 144 <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> 145 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="EKF::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" --> 146 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr> 147 148 <tr><td class="mdescLeft"> </td><td class="mdescRight">If true, the filter will compute likelihood of the data record and store it in <code>ll</code> . Set to false if you want to save time. <br></td></tr> 127 149 </table> 128 150 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 132 154 Extended <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> Filter. 133 155 <p> 134 An approximation of the exact Bayesian filter with Gaussian noices and non-linear evolutions of their mean. <hr><h2>Member Function Documentation</h2> 135 <a class="anchor" name="a892eff438aab2dd1a9e2efcb7fb5bdf"></a><!-- doxytag: member="EKF::bayes" ref="a892eff438aab2dd1a9e2efcb7fb5bdf" args="(const vec &dt)=0" --> 136 <div class="memitem"> 137 <div class="memproto"> 138 <table class="memname"> 139 <tr> 140 <td class="memname">virtual void BM::bayes </td> 141 <td>(</td> 142 <td class="paramtype">const vec & </td> 143 <td class="paramname"> <em>dt</em> </td> 144 <td> ) </td> 145 <td width="100%"><code> [pure virtual, inherited]</code></td> 146 </tr> 147 </table> 148 </div> 149 <div class="memdoc"> 150 151 <p> 152 Incremental Bayes rule. 153 <p> 154 <dl compact><dt><b>Parameters:</b></dt><dd> 155 <table border="0" cellspacing="2" cellpadding="0"> 156 <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> 157 </table> 158 </dl> 159 160 </div> 161 </div><p> 162 <hr>The documentation for this class was generated from the following file:<ul> 156 An approximation of the exact Bayesian filter with Gaussian noices and non-linear evolutions of their mean. <hr>The documentation for this class was generated from the following file:<ul> 163 157 <li>work/mixpp/bdm/estim/<a class="el" href="libKF_8h-source.html">libKF.h</a></ul> 164 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:432008 for mixpp by 158 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:47 2008 for mixpp by 165 159 <a href="http://www.doxygen.org/index.html"> 166 160 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classEKF__coll__graph.map ¶
r28 r32 1 <area shape="rect" href="$classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="61,337,208,364"> 2 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,7,48,33"> 3 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="48,172,176,199"> 4 <area shape="rect" href="$classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix." alt="" coords="200,172,267,199"> 5 <area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="229,196,237,204"> 6 <area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="164,333,172,341"> 7 <area shape="rect" href="$classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form..." alt="" coords="203,7,264,33"> 8 <area shape="rect" title="\< fsqmat \>" alt="" coords="109,196,117,204"> 9 <area shape="rect" title="\< fsqmat \>" alt="" coords="127,333,135,341"> 10 <area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="108,31,116,39"> 11 <area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="108,168,116,176"> 12 <area shape="rect" href="$classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$." alt="" coords="277,337,344,364"> 13 <area shape="rect" title="pfxu\nphxu" alt="" coords="299,361,307,369"> 14 <area shape="rect" title="pfxu\nphxu" alt="" coords="252,445,260,453"> 15 <area shape="rect" href="$classfnc.html" title="Class representing function $f(x)$ of variable $x$ represented by rv." alt="" coords="291,172,331,199"> 16 <area shape="rect" href="$classRV.html" title="Class representing variables, most often random variables." alt="" coords="355,172,392,199"> 17 <area shape="rect" title="rvu\nrvx" alt="" coords="365,196,373,204"> 18 <area shape="rect" title="rvu\nrvx" alt="" coords="313,333,321,341"> 1 <area shape="rect" href="$classKalman.html" title="Kalman\< ldmat \>" alt="" coords="300,636,436,663"> 2 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="339,231,381,257"> 3 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="201,412,329,439"> 4 <area shape="rect" href="$classRV.html" title="Class representing variables, most often random variables." alt="" coords="344,7,381,33"> 5 <area shape="rect" title="rvu\nrvy" alt="" coords="372,31,380,39"> 6 <area shape="rect" title="rvu\nrvy" alt="" coords="375,632,383,640"> 7 <area shape="rect" title="rv" alt="" coords="359,31,367,39"> 8 <area shape="rect" title="rv" alt="" coords="356,227,364,235"> 9 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="177,119,228,145"> 10 <area shape="rect" title="rv" alt="" coords="340,21,348,29"> 11 <area shape="rect" title="rv" alt="" coords="208,115,216,123"> 12 <area shape="rect" title="rvu\nrvy" alt="" coords="356,31,364,39"> 13 <area shape="rect" title="rvu\nrvy" alt="" coords="268,408,276,416"> 14 <area shape="rect" href="$classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$." alt="" coords="456,119,523,145"> 15 <area shape="rect" title="rvu\nrvx" alt="" coords="379,24,387,32"> 16 <area shape="rect" title="rvu\nrvx" alt="" coords="477,115,485,123"> 17 <area shape="rect" href="$classenorm.html" title="enorm\< ldmat \>" alt="" coords="85,524,216,551"> 18 <area shape="rect" title="est\nfy" alt="" coords="157,548,165,556"> 19 <area shape="rect" title="est\nfy" alt="" coords="296,635,304,643"> 20 <area shape="rect" href="$classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="140,231,185,257"> 21 <area shape="rect" href="$classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="5,412,125,439"> 22 <area shape="rect" title="\< ldmat \>" alt="" coords="60,436,68,444"> 23 <area shape="rect" title="\< ldmat \>" alt="" coords="105,520,113,528"> 24 <area shape="rect" title="_iR\nR" alt="" coords="225,255,233,263"> 25 <area shape="rect" title="_iR\nR" alt="" coords="93,408,101,416"> 26 <area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="235,255,243,263"> 27 <area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="259,408,267,416"> 28 <area shape="rect" title="\< ldmat \>" alt="" coords="261,436,269,444"> 29 <area shape="rect" title="\< ldmat \>" alt="" coords="347,632,355,640"> 30 <area shape="rect" title="pfxu\nphxu" alt="" coords="484,143,492,151"> 31 <area shape="rect" title="pfxu\nphxu" alt="" coords="451,712,459,720"> 32 <area shape="rect" href="$classfnc.html" title="Class representing function $f(x)$ of variable $x$ represented by rv." alt="" coords="484,7,524,33"> -
TabularUnified doc/html/classEKF__coll__graph.md5 ¶
r28 r32 1 f0af3ae76b214ecac356cc7e830905d0 1 eac9a6977a76313b57f32e85c821e3ad -
TabularUnified doc/html/classEKF__inherit__graph.map ¶
r23 r32 1 <area shape="rect" href="$classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="5,183,152,209">2 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="6 9,7,112,33">3 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords=" 95,87,223,113">4 <area shape="rect" title="\< fsqmat \>" alt="" coords="143,111,151,119">5 <area shape="rect" title="\< fsqmat \>" alt="" coords="85,179,93,187">1 <area shape="rect" href="$classKalman.html" title="Kalman\< ldmat \>" alt="" coords="5,183,141,209"> 2 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="64,7,107,33"> 3 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="89,87,217,113"> 4 <area shape="rect" title="\< ldmat \>" alt="" coords="137,111,145,119"> 5 <area shape="rect" title="\< ldmat \>" alt="" coords="80,179,88,187"> -
TabularUnified doc/html/classEKF__inherit__graph.md5 ¶
r23 r32 1 77c3e69c7b4a245413e6ca3492286095 1 6a3a1968ec11de621b52f5f8c31928f4 -
TabularUnified doc/html/classKalman-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>Kalman< sq_T > Member List</h1>This is the complete list of members for <a class="el" href="classKalman.html">Kalman< sq_T ></a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 24 <tr class="memlist"><td><a class="el" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4">_epdf</a>()</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 25 <tr bgcolor="#f0f0f0"><td><b>_iP</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 25 26 <tr bgcolor="#f0f0f0"><td><b>_iRy</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 26 27 <tr bgcolor="#f0f0f0"><td><b>_K</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 28 <tr bgcolor="#f0f0f0"><td><b>_mu</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 29 <tr bgcolor="#f0f0f0"><td><b>_P</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 27 30 <tr bgcolor="#f0f0f0"><td><b>_Ry</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 28 31 <tr bgcolor="#f0f0f0"><td><b>_yp</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 29 32 <tr bgcolor="#f0f0f0"><td><b>A</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 30 33 <tr bgcolor="#f0f0f0"><td><b>B</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 31 <tr class="memlist"><td><a class="el" href="classKalman.html#e945d9205ca14acbd83ba80ea6f72b8e">bayes</a>(const vec &dt, bool evalll=true)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline]</code></td></tr> 32 <tr class="memlist"><td><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM::bayes</a>(const vec &dt)=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [pure virtual]</code></td></tr> 34 <tr class="memlist"><td><a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">bayes</a>(const vec &dt)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 33 35 <tr class="memlist"><td><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">BM::bayes</a>(mat Dt)</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 34 <tr class="memlist"><td><a class="el" href="classBM.html# ef32a12f4f89e4000bf5390ceda762ae">BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr>36 <tr class="memlist"><td><a class="el" href="classBM.html#605d28b426adb677c86a57ddb525132a">BM</a>(const RV &rv0)</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 35 37 <tr bgcolor="#f0f0f0"><td><b>C</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 36 38 <tr bgcolor="#f0f0f0"><td><b>D</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> … … 38 40 <tr bgcolor="#f0f0f0"><td><b>dimx</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 39 41 <tr bgcolor="#f0f0f0"><td><b>dimy</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 40 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 41 <tr class="memlist"><td><a class="el" href="classKalman.html#96958a5ebfa966d892137987f265083a">Kalman</a>(int dimx, int dimu, int dimy)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline]</code></td></tr> 42 <tr class="memlist"><td><a class="el" href="classKalman.html#83118f4bd2ecbc70b03cfd573088ed6f">Kalman</a>(mat A0, mat B0, mat C0, mat D0, sq_T R0, sq_T Q0, sq_T P0, vec mu0)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline]</code></td></tr> 43 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 44 <tr class="memlist"><td><a class="el" href="classKalman.html#3063a3f58a74cea672ae889971012eed">mu</a></td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td></td></tr> 45 <tr bgcolor="#f0f0f0"><td><b>operator<<</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [friend]</code></td></tr> 46 <tr class="memlist"><td><a class="el" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3">P</a></td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td></td></tr> 42 <tr class="memlist"><td><a class="el" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424">est</a></td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 43 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 44 <tr class="memlist"><td><a class="el" href="classKalman.html#e580ab06483952bd03f2e651763e184f">fy</a></td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 45 <tr class="memlist"><td><a class="el" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3">Kalman</a>(RV rvx0, RV rvy0, RV rvu0)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline]</code></td></tr> 46 <tr class="memlist"><td><a class="el" href="classKalman.html#ce38e31810aea4db45a83ad05eaba009">Kalman</a>(const Kalman< sq_T > &K0)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline]</code></td></tr> 47 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 47 48 <tr bgcolor="#f0f0f0"><td><b>Q</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 48 49 <tr bgcolor="#f0f0f0"><td><b>R</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 49 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:44 2008 for mixpp by 50 <tr class="memlist"><td><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 51 <tr bgcolor="#f0f0f0"><td><b>rvu</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 52 <tr bgcolor="#f0f0f0"><td><b>rvy</b> (defined in <a class="el" href="classKalman.html">Kalman< sq_T ></a>)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [protected]</code></td></tr> 53 <tr class="memlist"><td><a class="el" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0">set_est</a>(const vec &mu0, const sq_T &P0)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline]</code></td></tr> 54 <tr class="memlist"><td><a class="el" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a">set_parameters</a>(const mat &A0, const mat &B0, const mat &C0, const mat &D0, const sq_T &R0, const sq_T &Q0)</td><td><a class="el" href="classKalman.html">Kalman< sq_T ></a></td><td><code> [inline]</code></td></tr> 55 <tr class="memlist"><td><a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">~BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline, virtual]</code></td></tr> 56 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:50 2008 for mixpp by 50 57 <a href="http://www.doxygen.org/index.html"> 51 58 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classKalman.html ¶
r28 r32 31 31 <p><center><img src="classKalman__inherit__graph.png" border="0" usemap="#Kalman_3_01sq__T_01_4__inherit__map" alt="Inheritance graph"></center> 32 32 <map name="Kalman_3_01sq__T_01_4__inherit__map"> 33 <area shape="rect" href="classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="5,183,152,209"><area shape="rect" title="\< fsqmat \>" alt="" coords="75,111,83,119"><area shape="rect" title="\< fsqmat \>" alt="" coords="75,179,83,187"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="57,7,100,33"><area shape="rect" href="classEKF.html" title="Extended Kalman Filter." alt="" coords="27,263,131,289"></map>33 <area shape="rect" href="classKalman.html" title="Kalman\< ldmat \>" alt="" coords="49,183,185,209"><area shape="rect" title="\< ldmat \>" alt="" coords="113,111,121,119"><area shape="rect" title="\< ldmat \>" alt="" coords="113,179,121,187"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="96,7,139,33"><area shape="rect" href="classEKF.html" title="Extended Kalman Filter." alt="" coords="5,263,109,289"><area shape="rect" href="classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="133,263,221,289"></map> 34 34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 35 <div class="dynheader"> … … 38 38 <p><center><img src="classKalman__coll__graph.png" border="0" usemap="#Kalman_3_01sq__T_01_4__coll__map" alt="Collaboration graph"></center> 39 39 <map name="Kalman_3_01sq__T_01_4__coll__map"> 40 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords=" 13,7,56,33"><area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="97,31,105,39"><area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="68,168,76,176"></map>40 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="48,105,91,132"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="11,7,48,33"><area shape="rect" title="rvu\nrvy" alt="" coords="23,31,31,39"><area shape="rect" title="rvu\nrvy" alt="" coords="57,285,65,293"><area shape="rect" title="rv" alt="" coords="32,31,40,39"><area shape="rect" title="rv" alt="" coords="60,101,68,109"><area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="131,129,139,137"><area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="72,285,80,293"></map> 41 41 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 42 42 … … 45 45 <tr><td></td></tr> 46 46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 96958a5ebfa966d892137987f265083a"></a><!-- doxytag: member="Kalman::Kalman" ref="96958a5ebfa966d892137987f265083a" args="(int dimx, int dimu, int dimy)" -->48 </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html# 96958a5ebfa966d892137987f265083a">Kalman</a> (int dimx, int dimu, int dimy)</td></tr>47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d56b0a97b8c1e25fdd3b10eef3c2ad3"></a><!-- doxytag: member="Kalman::Kalman" ref="3d56b0a97b8c1e25fdd3b10eef3c2ad3" args="(RV rvx0, RV rvy0, RV rvu0)" --> 48 </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3">Kalman</a> (<a class="el" href="classRV.html">RV</a> rvx0, <a class="el" href="classRV.html">RV</a> rvy0, <a class="el" href="classRV.html">RV</a> rvu0)</td></tr> 49 49 50 50 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 83118f4bd2ecbc70b03cfd573088ed6f"></a><!-- doxytag: member="Kalman::Kalman" ref="83118f4bd2ecbc70b03cfd573088ed6f" args="(mat A0, mat B0, mat C0, mat D0, sq_T R0, sq_T Q0, sq_T P0, vec mu0)" -->52 </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html# 83118f4bd2ecbc70b03cfd573088ed6f">Kalman</a> (mat A0, mat B0, mat C0, mat D0, sq_T R0, sq_T Q0, sq_T P0, vec mu0)</td></tr>51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce38e31810aea4db45a83ad05eaba009"></a><!-- doxytag: member="Kalman::Kalman" ref="ce38e31810aea4db45a83ad05eaba009" args="(const Kalman< sq_T > &K0)" --> 52 </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#ce38e31810aea4db45a83ad05eaba009">Kalman</a> (const <a class="el" href="classKalman.html">Kalman</a>< sq_T > &K0)</td></tr> 53 53 54 <tr><td class="mdescLeft"> </td><td class="mdescRight">Full constructor. <br></td></tr> 55 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e945d9205ca14acbd83ba80ea6f72b8e"></a><!-- doxytag: member="Kalman::bayes" ref="e945d9205ca14acbd83ba80ea6f72b8e" args="(const vec &dt, bool evalll=true)" --> 56 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#e945d9205ca14acbd83ba80ea6f72b8e">bayes</a> (const vec &dt, bool <a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a>=true)</td></tr> 54 <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br></td></tr> 55 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="239b28a0380946f5749b2f8d2807f93a"></a><!-- doxytag: member="Kalman::set_parameters" ref="239b28a0380946f5749b2f8d2807f93a" args="(const mat &A0, const mat &B0, const mat &C0, const mat &D0, const sq_T &R0, const sq_T &Q0)" --> 56 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a">set_parameters</a> (const mat &A0, const mat &B0, const mat &C0, const mat &D0, const sq_T &R0, const sq_T &Q0)</td></tr> 57 58 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set parameters with check of relevance. <br></td></tr> 59 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80bcf29466d9a9dd2b8f74699807d0c0"></a><!-- doxytag: member="Kalman::set_est" ref="80bcf29466d9a9dd2b8f74699807d0c0" args="(const vec &mu0, const sq_T &P0)" --> 60 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0">set_est</a> (const vec &mu0, const sq_T &P0)</td></tr> 61 62 <tr><td class="mdescLeft"> </td><td class="mdescRight">Set estimate values, used e.g. in initialization. <br></td></tr> 63 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7750ffd73f261828a32c18aaeb65c75c"></a><!-- doxytag: member="Kalman::bayes" ref="7750ffd73f261828a32c18aaeb65c75c" args="(const vec &dt)" --> 64 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">bayes</a> (const vec &dt)</td></tr> 57 65 58 66 <tr><td class="mdescLeft"> </td><td class="mdescRight">Here dt = [yt;ut] of appropriate dimensions. <br></td></tr> 59 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">bayes</a> (const vec &dt)=0</td></tr> 67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a213c57aef55b2645e550bed81cfc0d4"></a><!-- doxytag: member="Kalman::_epdf" ref="a213c57aef55b2645e550bed81cfc0d4" args="()" --> 68 <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4">_epdf</a> ()</td></tr> 60 69 61 <tr><td class="mdescLeft"> </td><td class="mdescRight"> Incremental Bayes rule. <a href="#a892eff438aab2dd1a9e2efcb7fb5bdf"></a><br></td></tr>70 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr> 62 71 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87b07867fd4c133aa89a18543f68d9f9"></a><!-- doxytag: member="Kalman::bayes" ref="87b07867fd4c133aa89a18543f68d9f9" args="(mat Dt)" --> 63 72 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">bayes</a> (mat Dt)</td></tr> 64 73 65 74 <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> 66 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5b8f6c8a872738cfaa30ab010e8c077"></a><!-- doxytag: member="Kalman::_epdf" ref="a5b8f6c8a872738cfaa30ab010e8c077" args="()" --> 67 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a> ()</td></tr> 75 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 76 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7501230c2fafa3655887d2da23b3184c"></a><!-- doxytag: member="Kalman::rvy" ref="7501230c2fafa3655887d2da23b3184c" args="" --> 77 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>rvy</b></td></tr> 68 78 69 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr> 70 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> 71 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3063a3f58a74cea672ae889971012eed"></a><!-- doxytag: member="Kalman::mu" ref="3063a3f58a74cea672ae889971012eed" args="" --> 72 vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#3063a3f58a74cea672ae889971012eed">mu</a></td></tr> 79 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="44a16ffd5ac1e6e39bae34fea9e1e498"></a><!-- doxytag: member="Kalman::rvu" ref="44a16ffd5ac1e6e39bae34fea9e1e498" args="" --> 80 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>rvu</b></td></tr> 73 81 74 <tr><td class="mdescLeft"> </td><td class="mdescRight">Mean value of the posterior density. <br></td></tr>75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="188cd5ac1c9e496b1a371eb7c57c97d3"></a><!-- doxytag: member="Kalman::P" ref="188cd5ac1c9e496b1a371eb7c57c97d3" args="" -->76 sq_T </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3">P</a></td></tr>77 78 <tr><td class="mdescLeft"> </td><td class="mdescRight">Mean value of the posterior density. <br></td></tr>79 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="Kalman::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" -->80 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr>81 82 <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr>83 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="Kalman::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" -->84 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr>85 86 <tr><td class="mdescLeft"> </td><td class="mdescRight">If true, the filter will compute likelihood of the data record and store it in <code>ll</code> . Set to false if you want to save time. <br></td></tr>87 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>88 82 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="39c8c403b46fa3b8c7da77cb2e3729eb"></a><!-- doxytag: member="Kalman::dimx" ref="39c8c403b46fa3b8c7da77cb2e3729eb" args="" --> 89 83 int </td><td class="memItemRight" valign="bottom"><b>dimx</b></td></tr> … … 113 107 sq_T </td><td class="memItemRight" valign="bottom"><b>Q</b></td></tr> 114 108 109 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5568c74bac67ae6d3b1061dba60c9424"></a><!-- doxytag: member="Kalman::est" ref="5568c74bac67ae6d3b1061dba60c9424" args="" --> 110 <a class="el" href="classenorm.html">enorm</a>< sq_T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424">est</a></td></tr> 111 112 <tr><td class="mdescLeft"> </td><td class="mdescRight">posterior density on $x_t$ <br></td></tr> 113 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e580ab06483952bd03f2e651763e184f"></a><!-- doxytag: member="Kalman::fy" ref="e580ab06483952bd03f2e651763e184f" args="" --> 114 <a class="el" href="classenorm.html">enorm</a>< sq_T > </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalman.html#e580ab06483952bd03f2e651763e184f">fy</a></td></tr> 115 116 <tr><td class="mdescLeft"> </td><td class="mdescRight">preditive density on $y_t$ <br></td></tr> 115 117 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d422f51467c7a06174af2476d2826132"></a><!-- doxytag: member="Kalman::_K" ref="d422f51467c7a06174af2476d2826132" args="" --> 116 118 mat </td><td class="memItemRight" valign="bottom"><b>_K</b></td></tr> 117 119 118 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 30b7461989185d3d02cf42b8e2a37649"></a><!-- doxytag: member="Kalman::_yp" ref="30b7461989185d3d02cf42b8e2a37649" args="" -->119 vec </td><td class="memItemRight" valign="bottom"><b>_yp</b></td></tr>120 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5188eb0329f8561f0b357af329769bf8"></a><!-- doxytag: member="Kalman::_yp" ref="5188eb0329f8561f0b357af329769bf8" args="" --> 121 vec * </td><td class="memItemRight" valign="bottom"><b>_yp</b></td></tr> 120 122 121 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 477dca07d91ea1a1f41d51bb0229934f"></a><!-- doxytag: member="Kalman::_Ry" ref="477dca07d91ea1a1f41d51bb0229934f" args="" -->122 sq_T </td><td class="memItemRight" valign="bottom"><b>_Ry</b></td></tr>123 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e17dd745daa8a958035a334a56fa4674"></a><!-- doxytag: member="Kalman::_Ry" ref="e17dd745daa8a958035a334a56fa4674" args="" --> 124 sq_T * </td><td class="memItemRight" valign="bottom"><b>_Ry</b></td></tr> 123 125 124 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 15f1a793210750a7e4642fcd948b24c5"></a><!-- doxytag: member="Kalman::_iRy" ref="15f1a793210750a7e4642fcd948b24c5" args="" -->125 sq_T </td><td class="memItemRight" valign="bottom"><b>_iRy</b></td></tr>126 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fbbdf31365f5a5674099599200ea193b"></a><!-- doxytag: member="Kalman::_iRy" ref="fbbdf31365f5a5674099599200ea193b" args="" --> 127 sq_T * </td><td class="memItemRight" valign="bottom"><b>_iRy</b></td></tr> 126 128 127 <tr><td colspan="2"><br><h2>Friends</h2></td></tr> 128 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="86ba216243ed95bb46d80d88775d16af"></a><!-- doxytag: member="Kalman::operator<<" ref="86ba216243ed95bb46d80d88775d16af" args="(std::ostream &os, const KalmanFull &kf)" --> 129 std::ostream & </td><td class="memItemRight" valign="bottom"><b>operator<<</b> (std::ostream &os, const <a class="el" href="classKalmanFull.html">KalmanFull</a> &kf)</td></tr> 129 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d1f669b5b3421a070cc75d77b55ba734"></a><!-- doxytag: member="Kalman::_mu" ref="d1f669b5b3421a070cc75d77b55ba734" args="" --> 130 vec * </td><td class="memItemRight" valign="bottom"><b>_mu</b></td></tr> 130 131 132 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3388218567128a797e69b109138271d"></a><!-- doxytag: member="Kalman::_P" ref="b3388218567128a797e69b109138271d" args="" --> 133 sq_T * </td><td class="memItemRight" valign="bottom"><b>_P</b></td></tr> 134 135 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b8bb7f870d69993493ba67ce40e7c3e9"></a><!-- doxytag: member="Kalman::_iP" ref="b8bb7f870d69993493ba67ce40e7c3e9" args="" --> 136 sq_T * </td><td class="memItemRight" valign="bottom"><b>_iP</b></td></tr> 137 138 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af00f0612fabe66241dd507188cdbf88"></a><!-- doxytag: member="Kalman::rv" ref="af00f0612fabe66241dd507188cdbf88" args="" --> 139 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td></tr> 140 141 <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> 142 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="Kalman::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" --> 143 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr> 144 145 <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr> 146 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="Kalman::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" --> 147 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr> 148 149 <tr><td class="mdescLeft"> </td><td class="mdescRight">If true, the filter will compute likelihood of the data record and store it in <code>ll</code> . Set to false if you want to save time. <br></td></tr> 131 150 </table> 132 151 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 134 153 class Kalman< sq_T ></h3> 135 154 136 <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with covariance matrices in square root form. <hr><h2>Member Function Documentation</h2> 137 <a class="anchor" name="a892eff438aab2dd1a9e2efcb7fb5bdf"></a><!-- doxytag: member="Kalman::bayes" ref="a892eff438aab2dd1a9e2efcb7fb5bdf" args="(const vec &dt)=0" --> 138 <div class="memitem"> 139 <div class="memproto"> 140 <table class="memname"> 141 <tr> 142 <td class="memname">virtual void BM::bayes </td> 143 <td>(</td> 144 <td class="paramtype">const vec & </td> 145 <td class="paramname"> <em>dt</em> </td> 146 <td> ) </td> 147 <td width="100%"><code> [pure virtual, inherited]</code></td> 148 </tr> 149 </table> 150 </div> 151 <div class="memdoc"> 152 153 <p> 154 Incremental Bayes rule. 155 <p> 156 <dl compact><dt><b>Parameters:</b></dt><dd> 157 <table border="0" cellspacing="2" cellpadding="0"> 158 <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> 159 </table> 160 </dl> 161 162 </div> 163 </div><p> 164 <hr>The documentation for this class was generated from the following file:<ul> 155 <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with covariance matrices in square root form. <hr>The documentation for this class was generated from the following file:<ul> 165 156 <li>work/mixpp/bdm/estim/<a class="el" href="libKF_8h-source.html">libKF.h</a></ul> 166 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 157 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:50 2008 for mixpp by 167 158 <a href="http://www.doxygen.org/index.html"> 168 159 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classKalmanFull-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>KalmanFull Member List</h1>This is the complete list of members for <a class="el" href="classKalmanFull.html">KalmanFull</a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 25 <tr class="memlist"><td><a class="el" href="classKalmanFull.html#048b13739b94c331cda08249b278552b">bayes</a>(const vec &dt, bool evalll=true)</td><td><a class="el" href="classKalmanFull.html">KalmanFull</a></td><td></td></tr> 26 <tr class="memlist"><td><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM::bayes</a>(const vec &dt)=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [pure virtual]</code></td></tr> 27 <tr class="memlist"><td><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">BM::bayes</a>(mat Dt)</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 28 <tr class="memlist"><td><a class="el" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae">BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 29 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 24 <tr class="memlist"><td><a class="el" href="classKalmanFull.html#13a041cd98ff157703766be275a657bb">bayes</a>(const vec &dt)</td><td><a class="el" href="classKalmanFull.html">KalmanFull</a></td><td></td></tr> 30 25 <tr class="memlist"><td><a class="el" href="classKalmanFull.html#7197ab6e7380790006394eabd3b97043">KalmanFull</a>(mat A, mat B, mat C, mat D, mat R, mat Q, mat P0, vec mu0)</td><td><a class="el" href="classKalmanFull.html">KalmanFull</a></td><td></td></tr> 31 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr>32 26 <tr class="memlist"><td><a class="el" href="classKalmanFull.html#fb5aec635e2720cc5ac31bc01c18a68a">mu</a></td><td><a class="el" href="classKalmanFull.html">KalmanFull</a></td><td></td></tr> 33 27 <tr bgcolor="#f0f0f0"><td><b>operator<<</b> (defined in <a class="el" href="classKalmanFull.html">KalmanFull</a>)</td><td><a class="el" href="classKalmanFull.html">KalmanFull</a></td><td><code> [friend]</code></td></tr> 34 28 <tr class="memlist"><td><a class="el" href="classKalmanFull.html#b75dc059e84fa8ffc076203b30f926cc">P</a></td><td><a class="el" href="classKalmanFull.html">KalmanFull</a></td><td></td></tr> 35 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 29 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:50 2008 for mixpp by 36 30 <a href="http://www.doxygen.org/index.html"> 37 31 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classKalmanFull.html ¶
r28 r32 21 21 </ul> 22 22 </div> 23 <h1>KalmanFull Class Reference</h1><!-- doxytag: class="KalmanFull" --> <!-- doxytag: inherits="BM" -->Basic <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with full matrices (education purpose only)! Will be deleted soon!23 <h1>KalmanFull Class Reference</h1><!-- doxytag: class="KalmanFull" -->Basic <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with full matrices (education purpose only)! Will be deleted soon! 24 24 <a href="#_details">More...</a> 25 25 <p> 26 26 <code>#include <<a class="el" href="libKF_8h-source.html">libKF.h</a>></code> 27 27 <p> 28 <div class="dynheader">29 Inheritance diagram for KalmanFull:</div>30 <div class="dynsection">31 <p><center><img src="classKalmanFull__inherit__graph.png" border="0" usemap="#KalmanFull__inherit__map" alt="Inheritance graph"></center>32 <map name="KalmanFull__inherit__map">33 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="29,7,72,33"></map>34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>35 <div class="dynheader">36 Collaboration diagram for KalmanFull:</div>37 <div class="dynsection">38 <p><center><img src="classKalmanFull__coll__graph.png" border="0" usemap="#KalmanFull__coll__map" alt="Collaboration graph"></center>39 <map name="KalmanFull__coll__map">40 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="29,7,72,33"></map>41 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>42 28 43 29 <p> … … 49 35 50 36 <tr><td class="mdescLeft"> </td><td class="mdescRight">Full constructor. <br></td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 048b13739b94c331cda08249b278552b"></a><!-- doxytag: member="KalmanFull::bayes" ref="048b13739b94c331cda08249b278552b" args="(const vec &dt, bool evalll=true)" -->52 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalmanFull.html# 048b13739b94c331cda08249b278552b">bayes</a> (const vec &dt, bool <a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a>=true)</td></tr>37 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="13a041cd98ff157703766be275a657bb"></a><!-- doxytag: member="KalmanFull::bayes" ref="13a041cd98ff157703766be275a657bb" args="(const vec &dt)" --> 38 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classKalmanFull.html#13a041cd98ff157703766be275a657bb">bayes</a> (const vec &dt)</td></tr> 53 39 54 40 <tr><td class="mdescLeft"> </td><td class="mdescRight">Here dt = [yt;ut] of appropriate dimensions. <br></td></tr> 55 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">bayes</a> (const vec &dt)=0</td></tr>56 57 <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#a892eff438aab2dd1a9e2efcb7fb5bdf"></a><br></td></tr>58 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87b07867fd4c133aa89a18543f68d9f9"></a><!-- doxytag: member="KalmanFull::bayes" ref="87b07867fd4c133aa89a18543f68d9f9" args="(mat Dt)" -->59 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">bayes</a> (mat Dt)</td></tr>60 61 <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr>62 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a5b8f6c8a872738cfaa30ab010e8c077"></a><!-- doxytag: member="KalmanFull::_epdf" ref="a5b8f6c8a872738cfaa30ab010e8c077" args="()" -->63 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a> ()</td></tr>64 65 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr>66 41 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> 67 42 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb5aec635e2720cc5ac31bc01c18a68a"></a><!-- doxytag: member="KalmanFull::mu" ref="fb5aec635e2720cc5ac31bc01c18a68a" args="" --> … … 73 48 74 49 <tr><td class="mdescLeft"> </td><td class="mdescRight">Variance of the posterior density. <br></td></tr> 75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="KalmanFull::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" -->76 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr>77 78 <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of marginalized data likelihood. <br></td></tr>79 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bf6fb59b30141074f8ee1e2f43d03129"></a><!-- doxytag: member="KalmanFull::evalll" ref="bf6fb59b30141074f8ee1e2f43d03129" args="" -->80 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td></tr>81 82 <tr><td class="mdescLeft"> </td><td class="mdescRight">If true, the filter will compute likelihood of the data record and store it in <code>ll</code> . Set to false if you want to save time. <br></td></tr>83 50 <tr><td colspan="2"><br><h2>Friends</h2></td></tr> 84 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="86ba216243ed95bb46d80d88775d16af"></a><!-- doxytag: member="KalmanFull::operator<<" ref="86ba216243ed95bb46d80d88775d16af" args="(std::ostream &os, const KalmanFull &kf)" --> … … 87 54 </table> 88 55 <hr><a name="_details"></a><h2>Detailed Description</h2> 89 Basic <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with full matrices (education purpose only)! Will be deleted soon! <hr><h2>Member Function Documentation</h2> 90 <a class="anchor" name="a892eff438aab2dd1a9e2efcb7fb5bdf"></a><!-- doxytag: member="KalmanFull::bayes" ref="a892eff438aab2dd1a9e2efcb7fb5bdf" args="(const vec &dt)=0" --> 91 <div class="memitem"> 92 <div class="memproto"> 93 <table class="memname"> 94 <tr> 95 <td class="memname">virtual void BM::bayes </td> 96 <td>(</td> 97 <td class="paramtype">const vec & </td> 98 <td class="paramname"> <em>dt</em> </td> 99 <td> ) </td> 100 <td width="100%"><code> [pure virtual, inherited]</code></td> 101 </tr> 102 </table> 103 </div> 104 <div class="memdoc"> 105 106 <p> 107 Incremental Bayes rule. 108 <p> 109 <dl compact><dt><b>Parameters:</b></dt><dd> 110 <table border="0" cellspacing="2" cellpadding="0"> 111 <tr><td valign="top"></td><td valign="top"><em>dt</em> </td><td>vector of input data </td></tr> 112 </table> 113 </dl> 114 115 </div> 116 </div><p> 117 <hr>The documentation for this class was generated from the following files:<ul> 56 Basic <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> filter with full matrices (education purpose only)! Will be deleted soon! <hr>The documentation for this class was generated from the following files:<ul> 118 57 <li>work/mixpp/bdm/estim/<a class="el" href="libKF_8h-source.html">libKF.h</a><li>work/mixpp/bdm/estim/libKF.cpp</ul> 119 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 58 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:50 2008 for mixpp by 120 59 <a href="http://www.doxygen.org/index.html"> 121 60 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classKalman__coll__graph.map ¶
r23 r32 1 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="13,7,56,33"> 2 <area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="97,31,105,39"> 3 <area shape="rect" title="P\nQ\nR\n_iRy\n_Ry" alt="" coords="68,168,76,176"> 1 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="48,105,91,132"> 2 <area shape="rect" href="$classRV.html" title="Class representing variables, most often random variables." alt="" coords="11,7,48,33"> 3 <area shape="rect" title="rvu\nrvy" alt="" coords="23,31,31,39"> 4 <area shape="rect" title="rvu\nrvy" alt="" coords="57,285,65,293"> 5 <area shape="rect" title="rv" alt="" coords="32,31,40,39"> 6 <area shape="rect" title="rv" alt="" coords="60,101,68,109"> 7 <area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="131,129,139,137"> 8 <area shape="rect" title="_iP\n_P\nQ\nR\n_iRy\n_Ry" alt="" coords="72,285,80,293"> -
TabularUnified doc/html/classKalman__coll__graph.md5 ¶
r23 r32 1 311ac5634b4d73b2f2526f463aadb32a 1 f6b55f1ef184b48187d2ae6c69a40dd1 -
TabularUnified doc/html/classKalman__inherit__graph.map ¶
r23 r32 1 <area shape="rect" href="$classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="5,183,152,209"> 2 <area shape="rect" title="\< fsqmat \>" alt="" coords="75,111,83,119"> 3 <area shape="rect" title="\< fsqmat \>" alt="" coords="75,179,83,187"> 4 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="57,7,100,33"> 5 <area shape="rect" href="$classEKF.html" title="Extended Kalman Filter." alt="" coords="27,263,131,289"> 1 <area shape="rect" href="$classKalman.html" title="Kalman\< ldmat \>" alt="" coords="49,183,185,209"> 2 <area shape="rect" title="\< ldmat \>" alt="" coords="113,111,121,119"> 3 <area shape="rect" title="\< ldmat \>" alt="" coords="113,179,121,187"> 4 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="96,7,139,33"> 5 <area shape="rect" href="$classEKF.html" title="Extended Kalman Filter." alt="" coords="5,263,109,289"> 6 <area shape="rect" href="$classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="133,263,221,289"> -
TabularUnified doc/html/classKalman__inherit__graph.md5 ¶
r23 r32 1 a793120a23be6e0a8083db15415045b3 1 325927edf6cbe7f4faf28a15528bc694 -
TabularUnified doc/html/classMemDS-members.html ¶
r28 r32 31 31 <tr class="memlist"><td><a class="el" href="classMemDS.html#b120ed178f7c848f1227c928d8a79be8">write</a>(vec &ut)</td><td><a class="el" href="classMemDS.html">MemDS</a></td><td><code> [inline]</code></td></tr> 32 32 <tr class="memlist"><td><a class="el" href="classMemDS.html#6279bf18d44343750747ecc12e050f09">write</a>(vec &ut, ivec &indexes)</td><td><a class="el" href="classMemDS.html">MemDS</a></td><td><code> [inline]</code></td></tr> 33 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 33 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:53 2008 for mixpp by 34 34 <a href="http://www.doxygen.org/index.html"> 35 35 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classMemDS.html ¶
r28 r32 121 121 <hr>The documentation for this class was generated from the following files:<ul> 122 122 <li>work/mixpp/bdm/stat/<a class="el" href="libDS_8h-source.html">libDS.h</a><li>work/mixpp/bdm/stat/libDS.cpp</ul> 123 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 123 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:53 2008 for mixpp by 124 124 <a href="http://www.doxygen.org/index.html"> 125 125 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classPF-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>PF Member List</h1>This is the complete list of members for <a class="el" href="classPF.html">PF</a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 25 <tr bgcolor="#f0f0f0"><td><b>bayes</b>(const vec &dt, bool evell) (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [inline]</code></td></tr> 26 <tr class="memlist"><td><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM::bayes</a>(const vec &dt)=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [pure virtual]</code></td></tr> 24 <tr class="memlist"><td><a class="el" href="classBM.html#3dc45554556926bde996a267636abe55">_epdf</a>()=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [pure virtual]</code></td></tr> 25 <tr class="memlist"><td><a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">bayes</a>(const vec &dt)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [virtual]</code></td></tr> 27 26 <tr class="memlist"><td><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">BM::bayes</a>(mat Dt)</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 28 <tr class="memlist"><td><a class="el" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae">BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 29 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 30 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 31 <tr bgcolor="#f0f0f0"><td><b>n</b> (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 32 <tr bgcolor="#f0f0f0"><td><b>PF</b>(vec w) (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td></td></tr> 33 <tr class="memlist"><td><a class="el" href="classPF.html#a0e26b2f6a5884aca49122f3e4f0cf19">resample</a>(RESAMPLING_METHOD method=SYSTEMATIC)</td><td><a class="el" href="classPF.html">PF</a></td><td></td></tr> 34 <tr bgcolor="#f0f0f0"><td><b>URNG</b> (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 35 <tr bgcolor="#f0f0f0"><td><b>w</b> (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 36 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:44 2008 for mixpp by 27 <tr class="memlist"><td><a class="el" href="classBM.html#605d28b426adb677c86a57ddb525132a">BM</a>(const RV &rv0)</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0">ePdf</a></td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 29 <tr class="memlist"><td><a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">evalll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 30 <tr class="memlist"><td><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 31 <tr class="memlist"><td><a class="el" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280">n</a></td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 32 <tr class="memlist"><td><a class="el" href="classPF.html#dd0a687a4515333d6809147335854e77">obs</a></td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 33 <tr class="memlist"><td><a class="el" href="classPF.html#d92ac103f88f8c21e197e90af5695a09">par</a></td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 34 <tr bgcolor="#f0f0f0"><td><b>PF</b>(const RV &rv0, mpdf &par0, mpdf &obs0, int n) (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [inline]</code></td></tr> 35 <tr class="memlist"><td><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td><td><a class="el" href="classBM.html">BM</a></td><td><code> [protected]</code></td></tr> 36 <tr class="memlist"><td><a class="el" href="classPF.html#361743a0b5b89de1a29e91d1343b2565">samples</a></td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 37 <tr bgcolor="#f0f0f0"><td><b>set_est</b>(const epdf *&epdf0) (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td></td></tr> 38 <tr class="memlist"><td><a class="el" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0">w</a></td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 39 <tr class="memlist"><td><a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">~BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline, virtual]</code></td></tr> 40 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:56 2008 for mixpp by 37 41 <a href="http://www.doxygen.org/index.html"> 38 42 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classPF.html ¶
r28 r32 21 21 </ul> 22 22 </div> 23 <h1>PF Class Reference</h1><!-- doxytag: class="PF" --><!-- doxytag: inherits="BM" --> A Particle Filter prototype.23 <h1>PF Class Reference</h1><!-- doxytag: class="PF" --><!-- doxytag: inherits="BM" -->Trivial particle filter with proposal density equal to parameter evolution model. 24 24 <a href="#_details">More...</a> 25 25 <p> … … 31 31 <p><center><img src="classPF__inherit__graph.png" border="0" usemap="#PF__inherit__map" alt="Inheritance graph"></center> 32 32 <map name="PF__inherit__map"> 33 <area shape="rect" href="class TrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data..." alt="" coords="5,161,77,188"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="20,7,63,33"></map>33 <area shape="rect" href="classMPF.html" title="Marginalized Particle filter." alt="" coords="5,161,120,188"><area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="41,7,84,33"></map> 34 34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 35 <div class="dynheader"> … … 38 38 <p><center><img src="classPF__coll__graph.png" border="0" usemap="#PF__coll__map" alt="Collaboration graph"></center> 39 39 <map name="PF__coll__map"> 40 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5, 7,48,33"></map>40 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,161,48,188"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="72,7,109,33"><area shape="rect" title="rv" alt="" coords="72,31,80,39"><area shape="rect" title="rv" alt="" coords="24,157,32,165"><area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="64,215,120,241"><area shape="rect" title="rv\nrvc" alt="" coords="87,31,95,39"><area shape="rect" title="rv\nrvc" alt="" coords="88,211,96,219"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="135,105,185,132"><area shape="rect" title="rv" alt="" coords="97,31,105,39"><area shape="rect" title="rv" alt="" coords="147,101,155,109"><area shape="rect" title="obs\npar" alt="" coords="88,239,96,247"><area shape="rect" title="obs\npar" alt="" coords="88,323,96,331"><area shape="rect" title="ep" alt="" coords="147,129,155,137"><area shape="rect" title="ep" alt="" coords="96,211,104,219"><area shape="rect" href="classeEmp.html" title="Weighted empirical density." alt="" coords="144,215,203,241"><area shape="rect" title="ePdf" alt="" coords="159,239,167,247"><area shape="rect" title="ePdf" alt="" coords="97,323,105,331"></map> 41 41 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 42 42 … … 45 45 <tr><td></td></tr> 46 46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" a0e26b2f6a5884aca49122f3e4f0cf19"></a><!-- doxytag: member="PF::resample" ref="a0e26b2f6a5884aca49122f3e4f0cf19" args="(RESAMPLING_METHOD method=SYSTEMATIC)" -->48 ivec </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#a0e26b2f6a5884aca49122f3e4f0cf19">resample</a> (RESAMPLING_METHOD method=SYSTEMATIC)</td></tr>47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e9604b7fc87ff5e61da4de4a04210bfc"></a><!-- doxytag: member="PF::PF" ref="e9604b7fc87ff5e61da4de4a04210bfc" args="(const RV &rv0, mpdf &par0, mpdf &obs0, int n)" --> 48 </td><td class="memItemRight" valign="bottom"><b>PF</b> (const <a class="el" href="classRV.html">RV</a> &rv0, <a class="el" href="classmpdf.html">mpdf</a> &par0, <a class="el" href="classmpdf.html">mpdf</a> &obs0, int <a class="el" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280">n</a>)</td></tr> 49 49 50 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns indexes of particles that should be resampled. The ordering MUST guarantee inplace replacement. (Important for MPF.). <br></td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c37f95f0c1661c7f1e3fccb31d39de73"></a><!-- doxytag: member="PF::PF" ref="c37f95f0c1661c7f1e3fccb31d39de73" args="(vec w)" --> 52 </td><td class="memItemRight" valign="bottom"><b>PF</b> (vec w)</td></tr> 50 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c5caa2c15604338b773d7a8125e7a1b5"></a><!-- doxytag: member="PF::set_est" ref="c5caa2c15604338b773d7a8125e7a1b5" args="(const epdf *&epdf0)" --> 51 void </td><td class="memItemRight" valign="bottom"><b>set_est</b> (const <a class="el" href="classepdf.html">epdf</a> *&epdf0)</td></tr> 53 52 54 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eb06bd7d4325f22f54233967295793b9"></a><!-- doxytag: member="PF::bayes" ref="eb06bd7d4325f22f54233967295793b9" args="(const vec &dt, bool evell)" --> 55 void </td><td class="memItemRight" valign="bottom"><b>bayes</b> (const vec &dt, bool evell)</td></tr> 53 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">bayes</a> (const vec &dt)</td></tr> 56 54 57 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">bayes</a> (const vec &dt)=0</td></tr> 58 59 <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#a892eff438aab2dd1a9e2efcb7fb5bdf"></a><br></td></tr> 55 <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#64f636bbd63bea9efd778214e6b631d3"></a><br></td></tr> 60 56 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87b07867fd4c133aa89a18543f68d9f9"></a><!-- doxytag: member="PF::bayes" ref="87b07867fd4c133aa89a18543f68d9f9" args="(mat Dt)" --> 61 57 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">bayes</a> (mat Dt)</td></tr> 62 58 63 59 <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> 64 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" a5b8f6c8a872738cfaa30ab010e8c077"></a><!-- doxytag: member="PF::_epdf" ref="a5b8f6c8a872738cfaa30ab010e8c077" args="()" -->65 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a> ()</td></tr>60 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3dc45554556926bde996a267636abe55"></a><!-- doxytag: member="PF::_epdf" ref="3dc45554556926bde996a267636abe55" args="()=0" --> 61 virtual <a class="el" href="classepdf.html">epdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#3dc45554556926bde996a267636abe55">_epdf</a> ()=0</td></tr> 66 62 67 63 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr> 68 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> 64 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 65 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c2f44ed7a4eaa42e07bdb58d503f280"></a><!-- doxytag: member="PF::n" ref="2c2f44ed7a4eaa42e07bdb58d503f280" args="" --> 66 int </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280">n</a></td></tr> 67 68 <tr><td class="mdescLeft"> </td><td class="mdescRight">number of particles; <br></td></tr> 69 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2ac56d1e3ffbb4ff0b3f02e6399deb0"></a><!-- doxytag: member="PF::ePdf" ref="a2ac56d1e3ffbb4ff0b3f02e6399deb0" args="" --> 70 <a class="el" href="classeEmp.html">eEmp</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0">ePdf</a></td></tr> 71 72 <tr><td class="mdescLeft"> </td><td class="mdescRight">posterior density <br></td></tr> 73 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a97d12da4d1832c0b0c6ec5877f921f0"></a><!-- doxytag: member="PF::w" ref="a97d12da4d1832c0b0c6ec5877f921f0" args="" --> 74 vec & </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0">w</a></td></tr> 75 76 <tr><td class="mdescLeft"> </td><td class="mdescRight">pointer into <code><a class="el" href="classeEmp.html" title="Weighted empirical density.">eEmp</a></code> <br></td></tr> 77 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="361743a0b5b89de1a29e91d1343b2565"></a><!-- doxytag: member="PF::samples" ref="361743a0b5b89de1a29e91d1343b2565" args="" --> 78 Array< vec > & </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#361743a0b5b89de1a29e91d1343b2565">samples</a></td></tr> 79 80 <tr><td class="mdescLeft"> </td><td class="mdescRight">pointer into <code><a class="el" href="classeEmp.html" title="Weighted empirical density.">eEmp</a></code> <br></td></tr> 81 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d92ac103f88f8c21e197e90af5695a09"></a><!-- doxytag: member="PF::par" ref="d92ac103f88f8c21e197e90af5695a09" args="" --> 82 <a class="el" href="classmpdf.html">mpdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#d92ac103f88f8c21e197e90af5695a09">par</a></td></tr> 83 84 <tr><td class="mdescLeft"> </td><td class="mdescRight">Parameter evolution model. <br></td></tr> 85 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd0a687a4515333d6809147335854e77"></a><!-- doxytag: member="PF::obs" ref="dd0a687a4515333d6809147335854e77" args="" --> 86 <a class="el" href="classmpdf.html">mpdf</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#dd0a687a4515333d6809147335854e77">obs</a></td></tr> 87 88 <tr><td class="mdescLeft"> </td><td class="mdescRight">Observation model. <br></td></tr> 89 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="af00f0612fabe66241dd507188cdbf88"></a><!-- doxytag: member="PF::rv" ref="af00f0612fabe66241dd507188cdbf88" args="" --> 90 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">rv</a></td></tr> 91 92 <tr><td class="mdescLeft"> </td><td class="mdescRight">Random variable of the posterior. <br></td></tr> 69 93 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5623fef6572a08c2b53b8c87b82dc979"></a><!-- doxytag: member="PF::ll" ref="5623fef6572a08c2b53b8c87b82dc979" args="" --> 70 94 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">ll</a></td></tr> … … 75 99 76 100 <tr><td class="mdescLeft"> </td><td class="mdescRight">If true, the filter will compute likelihood of the data record and store it in <code>ll</code> . Set to false if you want to save time. <br></td></tr> 77 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>78 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c2f44ed7a4eaa42e07bdb58d503f280"></a><!-- doxytag: member="PF::n" ref="2c2f44ed7a4eaa42e07bdb58d503f280" args="" -->79 int </td><td class="memItemRight" valign="bottom"><b>n</b></td></tr>80 81 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6bc92f7979af4513b06b161497ba868"></a><!-- doxytag: member="PF::w" ref="f6bc92f7979af4513b06b161497ba868" args="" -->82 vec </td><td class="memItemRight" valign="bottom"><b>w</b></td></tr>83 84 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3568ca7c3b3175d98b548f496b4c34dd"></a><!-- doxytag: member="PF::URNG" ref="3568ca7c3b3175d98b548f496b4c34dd" args="" -->85 Uniform_RNG </td><td class="memItemRight" valign="bottom"><b>URNG</b></td></tr>86 87 101 </table> 88 102 <hr><a name="_details"></a><h2>Detailed Description</h2> 89 A Particle Filter prototype.103 Trivial particle filter with proposal density equal to parameter evolution model. 90 104 <p> 91 Bayesian Filtering equations hold. <hr><h2>Member Function Documentation</h2>92 <a class="anchor" name=" a892eff438aab2dd1a9e2efcb7fb5bdf"></a><!-- doxytag: member="PF::bayes" ref="a892eff438aab2dd1a9e2efcb7fb5bdf" args="(const vec &dt)=0" -->105 Posterior density is represented by a weighted empirical density (<code><a class="el" href="classeEmp.html" title="Weighted empirical density.">eEmp</a></code> ). <hr><h2>Member Function Documentation</h2> 106 <a class="anchor" name="64f636bbd63bea9efd778214e6b631d3"></a><!-- doxytag: member="PF::bayes" ref="64f636bbd63bea9efd778214e6b631d3" args="(const vec &dt)" --> 93 107 <div class="memitem"> 94 108 <div class="memproto"> 95 109 <table class="memname"> 96 110 <tr> 97 <td class="memname">v irtual void BM::bayes </td>111 <td class="memname">void PF::bayes </td> 98 112 <td>(</td> 99 113 <td class="paramtype">const vec & </td> 100 114 <td class="paramname"> <em>dt</em> </td> 101 115 <td> ) </td> 102 <td width="100%"><code> [ pure virtual, inherited]</code></td>116 <td width="100%"><code> [virtual]</code></td> 103 117 </tr> 104 118 </table> … … 115 129 </dl> 116 130 131 <p>Implements <a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM</a>.</p> 132 133 <p>Reimplemented in <a class="el" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623">MPF< BM_T ></a>.</p> 134 117 135 </div> 118 136 </div><p> 119 137 <hr>The documentation for this class was generated from the following files:<ul> 120 138 <li>work/mixpp/bdm/estim/<a class="el" href="libPF_8h-source.html">libPF.h</a><li>work/mixpp/bdm/estim/libPF.cpp</ul> 121 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 139 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:56 2008 for mixpp by 122 140 <a href="http://www.doxygen.org/index.html"> 123 141 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classPF__coll__graph.map ¶
r23 r32 1 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,7,48,33"> 1 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,161,48,188"> 2 <area shape="rect" href="$classRV.html" title="Class representing variables, most often random variables." alt="" coords="72,7,109,33"> 3 <area shape="rect" title="rv" alt="" coords="72,31,80,39"> 4 <area shape="rect" title="rv" alt="" coords="24,157,32,165"> 5 <area shape="rect" href="$classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="64,215,120,241"> 6 <area shape="rect" title="rv\nrvc" alt="" coords="87,31,95,39"> 7 <area shape="rect" title="rv\nrvc" alt="" coords="88,211,96,219"> 8 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="135,105,185,132"> 9 <area shape="rect" title="rv" alt="" coords="97,31,105,39"> 10 <area shape="rect" title="rv" alt="" coords="147,101,155,109"> 11 <area shape="rect" title="obs\npar" alt="" coords="88,239,96,247"> 12 <area shape="rect" title="obs\npar" alt="" coords="88,323,96,331"> 13 <area shape="rect" title="ep" alt="" coords="147,129,155,137"> 14 <area shape="rect" title="ep" alt="" coords="96,211,104,219"> 15 <area shape="rect" href="$classeEmp.html" title="Weighted empirical density." alt="" coords="144,215,203,241"> 16 <area shape="rect" title="ePdf" alt="" coords="159,239,167,247"> 17 <area shape="rect" title="ePdf" alt="" coords="97,323,105,331"> -
TabularUnified doc/html/classPF__coll__graph.md5 ¶
r23 r32 1 65c7526e0e83e6179c68c2ff1e032261 1 e31b6f167e746dc075ed1135d9514c9e -
TabularUnified doc/html/classPF__inherit__graph.map ¶
r23 r32 1 <area shape="rect" href="$class TrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data..." alt="" coords="5,161,77,188">2 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords=" 20,7,63,33">1 <area shape="rect" href="$classMPF.html" title="Marginalized Particle filter." alt="" coords="5,161,120,188"> 2 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="41,7,84,33"> -
TabularUnified doc/html/classPF__inherit__graph.md5 ¶
r23 r32 1 56c339d57be27eb168d655762c7340cf 1 1d95eb517c724597222e38b5557f51e1 -
TabularUnified doc/html/classRV-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>RV Member List</h1>This is the complete list of members for <a class="el" href="classRV.html">RV</a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classRV.html# f068a86abb5a6e46fcf76c939d2ed2ec">add</a>(RVrv2)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr>24 <tr class="memlist"><td><a class="el" href="classRV.html#18fa114b92017f7f80301a4f8d3a6382">add</a>(const RV &rv2)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 25 25 <tr class="memlist"><td><a class="el" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0">count</a>() const </td><td><a class="el" href="classRV.html">RV</a></td><td><code> [inline]</code></td></tr> 26 26 <tr class="memlist"><td><a class="el" href="classRV.html#6b078b1086224aca3a9e5a203e647fb6">find</a>(RV rv2)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 27 <tr bgcolor="#f0f0f0"><td><b>ids</b> (defined in <a class="el" href="classRV.html">RV</a>)</td><td><a class="el" href="classRV.html">RV</a></td><td><code> [protected]</code></td></tr> 27 28 <tr class="memlist"><td><a class="el" href="classRV.html#8470cf53be6e7bdba78ad0efbd203ee7">indexlist</a>()</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 29 <tr class="memlist"><td><a class="el" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9">len</a></td><td><a class="el" href="classRV.html">RV</a></td><td><code> [protected]</code></td></tr> 30 <tr bgcolor="#f0f0f0"><td><b>names</b> (defined in <a class="el" href="classRV.html">RV</a>)</td><td><a class="el" href="classRV.html">RV</a></td><td><code> [protected]</code></td></tr> 31 <tr bgcolor="#f0f0f0"><td><b>obs</b> (defined in <a class="el" href="classRV.html">RV</a>)</td><td><a class="el" href="classRV.html">RV</a></td><td><code> [protected]</code></td></tr> 28 32 <tr class="memlist"><td><a class="el" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45">operator()</a>(ivec ind)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 29 33 <tr class="memlist"><td><a class="el" href="classRV.html#cad6f15535d10437f6690cb4492176a8">operator<<</a>(std::ostream &os, const RV &rv)</td><td><a class="el" href="classRV.html">RV</a></td><td><code> [friend]</code></td></tr> … … 31 35 <tr class="memlist"><td><a class="el" href="classRV.html#cf911c3900214460ade1366b04058462">RV</a>(ivec ids)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 32 36 <tr class="memlist"><td><a class="el" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e">RV</a>()</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 37 <tr class="memlist"><td><a class="el" href="classRV.html#0cae53d262be90a775a99a198e17fa58">size</a></td><td><a class="el" href="classRV.html">RV</a></td><td><code> [protected]</code></td></tr> 38 <tr bgcolor="#f0f0f0"><td><b>sizes</b> (defined in <a class="el" href="classRV.html">RV</a>)</td><td><a class="el" href="classRV.html">RV</a></td><td><code> [protected]</code></td></tr> 33 39 <tr class="memlist"><td><a class="el" href="classRV.html#2bf35b18a32aad419f0516273939628e">subselect</a>(ivec ind)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 34 40 <tr class="memlist"><td><a class="el" href="classRV.html#4c5ec5e913fc598e242cb930ae8bdf4a">subt</a>(RV rv2)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 35 41 <tr class="memlist"><td><a class="el" href="classRV.html#e0a158d53ab9430627241f844f4c9a60">t</a>(int delta)</td><td><a class="el" href="classRV.html">RV</a></td><td></td></tr> 36 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:45 2008 for mixpp by 42 <tr bgcolor="#f0f0f0"><td><b>times</b> (defined in <a class="el" href="classRV.html">RV</a>)</td><td><a class="el" href="classRV.html">RV</a></td><td><code> [protected]</code></td></tr> 43 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:56 2008 for mixpp by 37 44 <a href="http://www.doxygen.org/index.html"> 38 45 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classRV.html ¶
r28 r32 51 51 52 52 <tr><td class="mdescLeft"> </td><td class="mdescRight">Find indexes of another rv in self. <br></td></tr> 53 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" f068a86abb5a6e46fcf76c939d2ed2ec"></a><!-- doxytag: member="RV::add" ref="f068a86abb5a6e46fcf76c939d2ed2ec" args="(RVrv2)" -->54 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRV.html# f068a86abb5a6e46fcf76c939d2ed2ec">add</a> (<a class="el" href="classRV.html">RV</a>rv2)</td></tr>53 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="18fa114b92017f7f80301a4f8d3a6382"></a><!-- doxytag: member="RV::add" ref="18fa114b92017f7f80301a4f8d3a6382" args="(const RV &rv2)" --> 54 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classRV.html#18fa114b92017f7f80301a4f8d3a6382">add</a> (const <a class="el" href="classRV.html">RV</a> &rv2)</td></tr> 55 55 56 56 <tr><td class="mdescLeft"> </td><td class="mdescRight">Add (concat) another variable to the current one. <br></td></tr> … … 75 75 76 76 <tr><td class="mdescLeft"> </td><td class="mdescRight">generate a list of indeces, i.e. which <br></td></tr> 77 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 78 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0cae53d262be90a775a99a198e17fa58"></a><!-- doxytag: member="RV::size" ref="0cae53d262be90a775a99a198e17fa58" args="" --> 79 int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRV.html#0cae53d262be90a775a99a198e17fa58">size</a></td></tr> 80 81 <tr><td class="mdescLeft"> </td><td class="mdescRight">size = sum of sizes <br></td></tr> 82 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d7b36e2bbccf880c8fcf1e8cc43c1a9"></a><!-- doxytag: member="RV::len" ref="0d7b36e2bbccf880c8fcf1e8cc43c1a9" args="" --> 83 int </td><td class="memItemRight" valign="bottom"><a class="el" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9">len</a></td></tr> 84 85 <tr><td class="mdescLeft"> </td><td class="mdescRight">len = number of individual rvs <br></td></tr> 86 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1bd7165140f4b880a7f344bbb1c433f9"></a><!-- doxytag: member="RV::ids" ref="1bd7165140f4b880a7f344bbb1c433f9" args="" --> 87 ivec </td><td class="memItemRight" valign="bottom"><b>ids</b></td></tr> 88 89 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c878aab13f34b420e1eb5b485563682b"></a><!-- doxytag: member="RV::sizes" ref="c878aab13f34b420e1eb5b485563682b" args="" --> 90 ivec </td><td class="memItemRight" valign="bottom"><b>sizes</b></td></tr> 91 92 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="646e530c47a2dd38254b778d9f11ac89"></a><!-- doxytag: member="RV::times" ref="646e530c47a2dd38254b778d9f11ac89" args="" --> 93 ivec </td><td class="memItemRight" valign="bottom"><b>times</b></td></tr> 94 95 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2999743deec9b4cdb7ce51747bc53319"></a><!-- doxytag: member="RV::obs" ref="2999743deec9b4cdb7ce51747bc53319" args="" --> 96 ivec </td><td class="memItemRight" valign="bottom"><b>obs</b></td></tr> 97 98 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="df5d0030b277a1db2f1fd5fb79152acb"></a><!-- doxytag: member="RV::names" ref="df5d0030b277a1db2f1fd5fb79152acb" args="" --> 99 Array< std::string > </td><td class="memItemRight" valign="bottom"><b>names</b></td></tr> 100 77 101 <tr><td colspan="2"><br><h2>Friends</h2></td></tr> 78 102 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cad6f15535d10437f6690cb4492176a8"></a><!-- doxytag: member="RV::operator<<" ref="cad6f15535d10437f6690cb4492176a8" args="(std::ostream &os, const RV &rv)" --> … … 86 110 More?... <hr>The documentation for this class was generated from the following files:<ul> 87 111 <li>work/mixpp/bdm/stat/<a class="el" href="libBM_8h-source.html">libBM.h</a><li>work/mixpp/bdm/stat/libBM.cpp</ul> 88 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:452008 for mixpp by 112 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:56 2008 for mixpp by 89 113 <a href="http://www.doxygen.org/index.html"> 90 114 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classTrivialPF-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>TrivialPF Member List</h1>This is the complete list of members for <a class="el" href="classTrivialPF.html">TrivialPF</a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="class BM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr>24 <tr class="memlist"><td><a class="el" href="classPF.html#53b7cc5a0709b0d40fb68408437c0aa2">_epdf</a>()</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [inline, virtual]</code></td></tr> 25 25 <tr bgcolor="#f0f0f0"><td><b>bayes</b>(const vec &dt, bool evalll) (defined in <a class="el" href="classTrivialPF.html">TrivialPF</a>)</td><td><a class="el" href="classTrivialPF.html">TrivialPF</a></td><td></td></tr> 26 <tr class="memlist"><td><a class="el" href="class BM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM::bayes</a>(const vec &dt)=0</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [purevirtual]</code></td></tr>26 <tr class="memlist"><td><a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">PF::bayes</a>(const vec &dt)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [inline, virtual]</code></td></tr> 27 27 <tr class="memlist"><td><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">BM::bayes</a>(mat Dt)</td><td><a class="el" href="classBM.html">BM</a></td><td></td></tr> 28 28 <tr class="memlist"><td><a class="el" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae">BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline]</code></td></tr> … … 36 36 <tr bgcolor="#f0f0f0"><td><b>URNG</b> (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 37 37 <tr bgcolor="#f0f0f0"><td><b>w</b> (defined in <a class="el" href="classPF.html">PF</a>)</td><td><a class="el" href="classPF.html">PF</a></td><td><code> [protected]</code></td></tr> 38 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:46 2008 for mixpp by 38 <tr class="memlist"><td><a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">~BM</a>()</td><td><a class="el" href="classBM.html">BM</a></td><td><code> [inline, virtual]</code></td></tr> 39 </table><hr size="1"><address style="text-align: right;"><small>Generated on Sat Feb 23 11:48:50 2008 for mixpp by 39 40 <a href="http://www.doxygen.org/index.html"> 40 41 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classTrivialPF.html ¶
r28 r32 58 58 59 59 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns indexes of particles that should be resampled. The ordering MUST guarantee inplace replacement. (Important for MPF.). <br></td></tr> 60 <tr><td class="memItemLeft" nowrap align="right" valign="top">v irtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">bayes</a> (const vec &dt)=0</td></tr>60 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">bayes</a> (const vec &dt)</td></tr> 61 61 62 <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="# a892eff438aab2dd1a9e2efcb7fb5bdf"></a><br></td></tr>62 <tr><td class="mdescLeft"> </td><td class="mdescRight">Incremental Bayes rule. <a href="#64f636bbd63bea9efd778214e6b631d3"></a><br></td></tr> 63 63 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87b07867fd4c133aa89a18543f68d9f9"></a><!-- doxytag: member="TrivialPF::bayes" ref="87b07867fd4c133aa89a18543f68d9f9" args="(mat Dt)" --> 64 64 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">bayes</a> (mat Dt)</td></tr> 65 65 66 66 <tr><td class="mdescLeft"> </td><td class="mdescRight">Batch Bayes rule (columns of Dt are observations). <br></td></tr> 67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" a5b8f6c8a872738cfaa30ab010e8c077"></a><!-- doxytag: member="TrivialPF::_epdf" ref="a5b8f6c8a872738cfaa30ab010e8c077" args="()" -->68 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class BM.html#a5b8f6c8a872738cfaa30ab010e8c077">_epdf</a> ()</td></tr>67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53b7cc5a0709b0d40fb68408437c0aa2"></a><!-- doxytag: member="TrivialPF::_epdf" ref="53b7cc5a0709b0d40fb68408437c0aa2" args="()" --> 68 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html#53b7cc5a0709b0d40fb68408437c0aa2">_epdf</a> ()</td></tr> 69 69 70 70 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a pointer to the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> representing posterior density on parameters. Use with care! <br></td></tr> … … 91 91 <hr><a name="_details"></a><h2>Detailed Description</h2> 92 92 Trivial particle filter with proposal density that is not conditioned on the data. <hr><h2>Member Function Documentation</h2> 93 <a class="anchor" name=" a892eff438aab2dd1a9e2efcb7fb5bdf"></a><!-- doxytag: member="TrivialPF::bayes" ref="a892eff438aab2dd1a9e2efcb7fb5bdf" args="(const vec &dt)=0" -->93 <a class="anchor" name="64f636bbd63bea9efd778214e6b631d3"></a><!-- doxytag: member="TrivialPF::bayes" ref="64f636bbd63bea9efd778214e6b631d3" args="(const vec &dt)" --> 94 94 <div class="memitem"> 95 95 <div class="memproto"> 96 96 <table class="memname"> 97 97 <tr> 98 <td class="memname">v irtual void BM::bayes </td>98 <td class="memname">void PF::bayes </td> 99 99 <td>(</td> 100 100 <td class="paramtype">const vec & </td> 101 101 <td class="paramname"> <em>dt</em> </td> 102 102 <td> ) </td> 103 <td width="100%"><code> [ purevirtual, inherited]</code></td>103 <td width="100%"><code> [inline, virtual, inherited]</code></td> 104 104 </tr> 105 105 </table> … … 116 116 </dl> 117 117 118 <p>Implements <a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM</a>.</p> 119 118 120 </div> 119 121 </div><p> 120 122 <hr>The documentation for this class was generated from the following files:<ul> 121 123 <li>work/mixpp/bdm/estim/<a class="el" href="libPF_8h-source.html">libPF.h</a><li>work/mixpp/bdm/estim/libPF.cpp</ul> 122 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:462008 for mixpp by 124 <hr size="1"><address style="text-align: right;"><small>Generated on Sat Feb 23 11:48:50 2008 for mixpp by 123 125 <a href="http://www.doxygen.org/index.html"> 124 126 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classbilinfn-members.html ¶
r28 r32 37 37 <tr bgcolor="#f0f0f0"><td><b>rvu</b> (defined in <a class="el" href="classdiffbifn.html">diffbifn</a>)</td><td><a class="el" href="classdiffbifn.html">diffbifn</a></td><td><code> [protected]</code></td></tr> 38 38 <tr bgcolor="#f0f0f0"><td><b>rvx</b> (defined in <a class="el" href="classdiffbifn.html">diffbifn</a>)</td><td><a class="el" href="classdiffbifn.html">diffbifn</a></td><td><code> [protected]</code></td></tr> 39 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 39 <tr class="memlist"><td><a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">~fnc</a>()</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [inline, virtual]</code></td></tr> 40 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:41 2008 for mixpp by 40 41 <a href="http://www.doxygen.org/index.html"> 41 42 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classbilinfn.html ¶
r28 r32 199 199 <hr>The documentation for this class was generated from the following files:<ul> 200 200 <li>work/mixpp/bdm/stat/<a class="el" href="libFN_8h-source.html">libFN.h</a><li>work/mixpp/bdm/stat/libFN.cpp</ul> 201 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:402008 for mixpp by 201 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:41 2008 for mixpp by 202 202 <a href="http://www.doxygen.org/index.html"> 203 203 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classconstfn-members.html ¶
r28 r32 28 28 <tr bgcolor="#f0f0f0"><td><b>eval</b>(vec &cond) (defined in <a class="el" href="classconstfn.html">constfn</a>)</td><td><a class="el" href="classconstfn.html">constfn</a></td><td><code> [inline]</code></td></tr> 29 29 <tr class="memlist"><td><a class="el" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">fnc::eval</a>(const vec &cond)</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [inline, virtual]</code></td></tr> 30 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:41 2008 for mixpp by 30 <tr class="memlist"><td><a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">~fnc</a>()</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [inline, virtual]</code></td></tr> 31 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 31 32 <a href="http://www.doxygen.org/index.html"> 32 33 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classconstfn.html ¶
r28 r32 71 71 class representing function $f(x) = a$, here rv is empty <hr>The documentation for this class was generated from the following file:<ul> 72 72 <li>work/mixpp/bdm/stat/<a class="el" href="libFN_8h-source.html">libFN.h</a></ul> 73 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:412008 for mixpp by 73 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 74 74 <a href="http://www.doxygen.org/index.html"> 75 75 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classdiffbifn-members.html ¶
r28 r32 35 35 <tr bgcolor="#f0f0f0"><td><b>rvu</b> (defined in <a class="el" href="classdiffbifn.html">diffbifn</a>)</td><td><a class="el" href="classdiffbifn.html">diffbifn</a></td><td><code> [protected]</code></td></tr> 36 36 <tr bgcolor="#f0f0f0"><td><b>rvx</b> (defined in <a class="el" href="classdiffbifn.html">diffbifn</a>)</td><td><a class="el" href="classdiffbifn.html">diffbifn</a></td><td><code> [protected]</code></td></tr> 37 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:41 2008 for mixpp by 37 <tr class="memlist"><td><a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">~fnc</a>()</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [inline, virtual]</code></td></tr> 38 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 38 39 <a href="http://www.doxygen.org/index.html"> 39 40 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classdiffbifn.html ¶
r28 r32 199 199 <hr>The documentation for this class was generated from the following file:<ul> 200 200 <li>work/mixpp/bdm/stat/<a class="el" href="libFN_8h-source.html">libFN.h</a></ul> 201 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:412008 for mixpp by 201 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 202 202 <a href="http://www.doxygen.org/index.html"> 203 203 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classeEF-members.html ¶
r28 r32 23 23 <h1>eEF Member List</h1>This is the complete list of members for <a class="el" href="classeEF.html">eEF</a>, including all inherited members.<p><table> 24 24 <tr bgcolor="#f0f0f0"><td><b>dupdate</b>(mat &v, double nu=1.0) (defined in <a class="el" href="classeEF.html">eEF</a>)</td><td><a class="el" href="classeEF.html">eEF</a></td><td><code> [inline, virtual]</code></td></tr> 25 <tr class="memlist"><td><a class="el" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e">eEF</a>()</td><td><a class="el" href="classeEF.html">eEF</a></td><td><code> [inline]</code></td></tr> 26 <tr bgcolor="#f0f0f0"><td><b>eEF</b>(const RV &rv) (defined in <a class="el" href="classeEF.html">eEF</a>)</td><td><a class="el" href="classeEF.html">eEF</a></td><td><code> [inline]</code></td></tr> 27 <tr class="memlist"><td><a class="el" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">epdf</a>()</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">epdf</a>(const RV &rv0)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline]</code></td></tr> 25 29 <tr class="memlist"><td><a class="el" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">eval</a>(const vec &val)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline, virtual]</code></td></tr> 30 <tr class="memlist"><td><a class="el" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">evalpdflog</a>(const vec &val)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline, virtual]</code></td></tr> 31 <tr class="memlist"><td><a class="el" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef">mean</a>()=0</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [pure virtual]</code></td></tr> 32 <tr bgcolor="#f0f0f0"><td><b>rv</b> (defined in <a class="el" href="classepdf.html">epdf</a>)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [protected]</code></td></tr> 26 33 <tr class="memlist"><td><a class="el" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa">sample</a>()=0</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [pure virtual]</code></td></tr> 27 34 <tr bgcolor="#f0f0f0"><td><b>tupdate</b>(double phi, mat &vbar, double nubar) (defined in <a class="el" href="classeEF.html">eEF</a>)</td><td><a class="el" href="classeEF.html">eEF</a></td><td><code> [inline, virtual]</code></td></tr> 28 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:41 2008 for mixpp by 35 <tr class="memlist"><td><a class="el" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">~epdf</a>()</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline, virtual]</code></td></tr> 36 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 29 37 <a href="http://www.doxygen.org/index.html"> 30 38 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classeEF.html ¶
r28 r32 31 31 <p><center><img src="classeEF__inherit__graph.png" border="0" usemap="#eEF__inherit__map" alt="Inheritance graph"></center> 32 32 <map name="eEF__inherit__map"> 33 <area shape="rect" href="classe norm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="5,161,125,188"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="40,7,91,33"></map>33 <area shape="rect" href="classegamma.html" title="Gamma posterior density." alt="" coords="5,167,85,193"><area shape="rect" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="109,167,229,193"><area shape="rect" href="classenorm.html" title="enorm\< ldmat \>" alt="" coords="155,263,285,289"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="144,7,195,33"><area shape="rect" title="\< ldmat \>" alt="" coords="167,191,175,199"><area shape="rect" title="\< ldmat \>" alt="" coords="199,259,207,267"></map> 34 34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 35 <div class="dynheader"> … … 45 45 <tr><td></td></tr> 46 46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="702e24158366430bc24d57c7f64e1e9e"></a><!-- doxytag: member="eEF::eEF" ref="702e24158366430bc24d57c7f64e1e9e" args="()" --> 48 </td><td class="memItemRight" valign="bottom"><a class="el" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e">eEF</a> ()</td></tr> 49 50 <tr><td class="mdescLeft"> </td><td class="mdescRight">default constructor <br></td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e3c63655e8375c76bf1f421245427a7"></a><!-- doxytag: member="eEF::eEF" ref="7e3c63655e8375c76bf1f421245427a7" args="(const RV &rv)" --> 52 </td><td class="memItemRight" valign="bottom"><b>eEF</b> (const <a class="el" href="classRV.html">RV</a> &rv)</td></tr> 53 47 54 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fd88bc35550ec8fe9281d358216d0fcf"></a><!-- doxytag: member="eEF::tupdate" ref="fd88bc35550ec8fe9281d358216d0fcf" args="(double phi, mat &vbar, double nubar)" --> 48 55 virtual void </td><td class="memItemRight" valign="bottom"><b>tupdate</b> (double phi, mat &vbar, double nubar)</td></tr> … … 58 65 59 66 <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute probability of argument <code>val</code>. <br></td></tr> 67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="113c76c61d20e3f2a24ba322a73dfc51"></a><!-- doxytag: member="eEF::evalpdflog" ref="113c76c61d20e3f2a24ba322a73dfc51" args="(const vec &val)" --> 68 virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">evalpdflog</a> (const vec &val)</td></tr> 69 70 <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of argument <code>val</code>. <br></td></tr> 71 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5b61fae74d370d2216576d598c1a74ef"></a><!-- doxytag: member="eEF::mean" ref="5b61fae74d370d2216576d598c1a74ef" args="()=0" --> 72 virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef">mean</a> ()=0</td></tr> 73 74 <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected value <br></td></tr> 75 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 76 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74da992e3f5d598da8850b646b79b9d9"></a><!-- doxytag: member="eEF::rv" ref="74da992e3f5d598da8850b646b79b9d9" args="" --> 77 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>rv</b></td></tr> 78 60 79 </table> 61 80 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 82 101 <p> 83 102 Returns a sample from the density, <img class="formulaInl" alt="$x \sim epdf(rv)$" src="form_3.png"> 84 <p>Implemented in <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< sq_T ></a> .</p>103 <p>Implemented in <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< sq_T ></a>, <a class="el" href="classegamma.html#0a2186a586432c2c3f22d09c5341890f">egamma</a>, <a class="el" href="classemix.html#3eb9a8e12ce1c5c8a3ddb245354b6941">emix</a>, <a class="el" href="classeuni.html#0f71562e3e919aba823cb7d9d420ad4c">euni</a>, <a class="el" href="classeEmp.html#c9b44099a400579b88aff9f5afaf9c13">eEmp</a>, and <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< ldmat ></a>.</p> 85 104 86 105 </div> … … 88 107 <hr>The documentation for this class was generated from the following file:<ul> 89 108 <li>work/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a></ul> 90 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:412008 for mixpp by 109 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:44 2008 for mixpp by 91 110 <a href="http://www.doxygen.org/index.html"> 92 111 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classeEF__inherit__graph.map ¶
r23 r32 1 <area shape="rect" href="$classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="5,161,125,188"> 2 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="40,7,91,33"> 1 <area shape="rect" href="$classegamma.html" title="Gamma posterior density." alt="" coords="5,167,85,193"> 2 <area shape="rect" href="$classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="109,167,229,193"> 3 <area shape="rect" href="$classenorm.html" title="enorm\< ldmat \>" alt="" coords="155,263,285,289"> 4 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="144,7,195,33"> 5 <area shape="rect" title="\< ldmat \>" alt="" coords="167,191,175,199"> 6 <area shape="rect" title="\< ldmat \>" alt="" coords="199,259,207,267"> -
TabularUnified doc/html/classeEF__inherit__graph.md5 ¶
r23 r32 1 82b61acbe4ec3fc52032591427413f2c 1 d73db8afd837987ace121c0c28affb22 -
TabularUnified doc/html/classenorm-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>enorm< sq_T > Member List</h1>This is the complete list of members for <a class="el" href="classenorm.html">enorm< sq_T ></a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classenorm.html#c9ca4f2ca42568e40ca146168e7f3247">_cached</a>(bool what)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr> 25 <tr class="memlist"><td><a class="el" href="classenorm.html#82f39ac49911d7097f4bfe385deba355">_iR</a></td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [protected]</code></td></tr> 26 <tr class="memlist"><td><a class="el" href="classenorm.html#3be0cb541ec9b88e5aa3f60307bbc753">_mu</a>()</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr> 27 <tr class="memlist"><td><a class="el" href="classenorm.html#8725c534863c4fc2bddef0edfb95a740">_R</a>(sq_T *&pR, sq_T *&piR)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1">cached</a></td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [protected]</code></td></tr> 29 <tr class="memlist"><td><a class="el" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e">dim</a></td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [protected]</code></td></tr> 24 30 <tr bgcolor="#f0f0f0"><td><b>dupdate</b>(mat &v, double nu=1.0) (defined in <a class="el" href="classenorm.html">enorm< sq_T ></a>)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 25 <tr class="memlist"><td><a class="el" href="classe norm.html#d1b0faf61260de09cf63bf823add5b32">dupdate</a>()</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td></td></tr>26 <tr bgcolor="#f0f0f0"><td><b>e norm</b>(RV &rv, vec &mu, sq_T &R) (defined in <a class="el" href="classenorm.html">enorm< sq_T ></a>)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr>31 <tr class="memlist"><td><a class="el" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e">eEF</a>()</td><td><a class="el" href="classeEF.html">eEF</a></td><td><code> [inline]</code></td></tr> 32 <tr bgcolor="#f0f0f0"><td><b>eEF</b>(const RV &rv) (defined in <a class="el" href="classeEF.html">eEF</a>)</td><td><a class="el" href="classeEF.html">eEF</a></td><td><code> [inline]</code></td></tr> 27 33 <tr bgcolor="#f0f0f0"><td><b>enorm</b>() (defined in <a class="el" href="classenorm.html">enorm< sq_T ></a>)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr> 34 <tr bgcolor="#f0f0f0"><td><b>enorm</b>(RV &rv) (defined in <a class="el" href="classenorm.html">enorm< sq_T ></a>)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr> 35 <tr class="memlist"><td><a class="el" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">epdf</a>()</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline]</code></td></tr> 36 <tr class="memlist"><td><a class="el" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">epdf</a>(const RV &rv0)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline]</code></td></tr> 28 37 <tr class="memlist"><td><a class="el" href="classenorm.html#93107f05a8e9b34b64853767200121a4">eval</a>(const vec &val)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 29 <tr bgcolor="#f0f0f0"><td><b>RNG</b> (defined in <a class="el" href="classenorm.html">enorm< sq_T ></a>)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td></td></tr> 38 <tr class="memlist"><td><a class="el" href="classenorm.html#9517594915e897584eaebbb057ed8881">evalpdflog</a>(const vec &val)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 39 <tr class="memlist"><td><a class="el" href="classenorm.html#191c1220c3ddd0c5f54e78f19b57ebd5">mean</a>()</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 40 <tr class="memlist"><td><a class="el" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">mu</a></td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [protected]</code></td></tr> 41 <tr class="memlist"><td><a class="el" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">R</a></td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [protected]</code></td></tr> 42 <tr bgcolor="#f0f0f0"><td><b>rv</b> (defined in <a class="el" href="classepdf.html">epdf</a>)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [protected]</code></td></tr> 30 43 <tr class="memlist"><td><a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">sample</a>()</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 31 44 <tr bgcolor="#f0f0f0"><td><b>sample</b>(int N) (defined in <a class="el" href="classenorm.html">enorm< sq_T ></a>)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr> 45 <tr bgcolor="#f0f0f0"><td><b>set_parameters</b>(const vec &mu, const sq_T &R) (defined in <a class="el" href="classenorm.html">enorm< sq_T ></a>)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline]</code></td></tr> 32 46 <tr class="memlist"><td><a class="el" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a">tupdate</a>(double phi, mat &vbar, double nubar)</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td><code> [inline, virtual]</code></td></tr> 33 <tr class="memlist"><td><a class="el" href="classe norm.html#2a1a522504c7788dfd7fb733157ee39e">tupdate</a>()</td><td><a class="el" href="classenorm.html">enorm< sq_T ></a></td><td></td></tr>34 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:432008 for mixpp by 47 <tr class="memlist"><td><a class="el" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">~epdf</a>()</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline, virtual]</code></td></tr> 48 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:48 2008 for mixpp by 35 49 <a href="http://www.doxygen.org/index.html"> 36 50 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classenorm.html ¶
r28 r32 31 31 <p><center><img src="classenorm__inherit__graph.png" border="0" usemap="#enorm_3_01sq__T_01_4__inherit__map" alt="Inheritance graph"></center> 32 32 <map name="enorm_3_01sq__T_01_4__inherit__map"> 33 <area shape="rect" href="classe EF.html" title="General conjugate exponential family posterior density." alt="" coords="43,84,88,111"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="40,7,91,33"></map>33 <area shape="rect" href="classenorm.html" title="enorm\< ldmat \>" alt="" coords="5,263,136,289"><area shape="rect" title="\< ldmat \>" alt="" coords="67,191,75,199"><area shape="rect" title="\< ldmat \>" alt="" coords="67,259,75,267"><area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="48,87,93,113"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="45,7,96,33"></map> 34 34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 35 <div class="dynheader"> … … 38 38 <p><center><img src="classenorm__coll__graph.png" border="0" usemap="#enorm_3_01sq__T_01_4__coll__map" alt="Collaboration graph"></center> 39 39 <map name="enorm_3_01sq__T_01_4__coll__map"> 40 <area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="8,183,53,209"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="5,103,56,129"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="12,7,49,33"><area shape="rect" title="rv" alt="" coords="27,31,35,39"><area shape="rect" title="rv" alt="" coords="27,99,35,107"><area shape="rect" title=" R" alt="" coords="93,207,101,215"><area shape="rect" title="R" alt="" coords="77,275,85,283"></map>40 <area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="8,183,53,209"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="5,103,56,129"><area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="12,7,49,33"><area shape="rect" title="rv" alt="" coords="27,31,35,39"><area shape="rect" title="rv" alt="" coords="27,99,35,107"><area shape="rect" title="_iR\nR" alt="" coords="95,207,103,215"><area shape="rect" title="_iR\nR" alt="" coords="77,291,85,299"></map> 41 41 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 42 42 … … 45 45 <tr><td></td></tr> 46 46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="183891111686898adef0f6ca292e600d"></a><!-- doxytag: member="enorm::enorm" ref="183891111686898adef0f6ca292e600d" args="(RV &rv, vec &mu, sq_T &R)" --> 48 </td><td class="memItemRight" valign="bottom"><b>enorm</b> (<a class="el" href="classRV.html">RV</a> &rv, vec &mu, sq_T &R)</td></tr> 47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7b5cb487a2570e8109bfdc0df149aa06"></a><!-- doxytag: member="enorm::enorm" ref="7b5cb487a2570e8109bfdc0df149aa06" args="(RV &rv)" --> 48 </td><td class="memItemRight" valign="bottom"><b>enorm</b> (<a class="el" href="classRV.html">RV</a> &rv)</td></tr> 49 50 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1394a65caa6e00d42e00cc99b12227af"></a><!-- doxytag: member="enorm::set_parameters" ref="1394a65caa6e00d42e00cc99b12227af" args="(const vec &mu, const sq_T &R)" --> 51 void </td><td class="memItemRight" valign="bottom"><b>set_parameters</b> (const vec &<a class="el" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">mu</a>, const sq_T &<a class="el" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">R</a>)</td></tr> 49 52 50 53 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5b5fd142b6b17ea334597960e3fe126a"></a><!-- doxytag: member="enorm::tupdate" ref="5b5fd142b6b17ea334597960e3fe126a" args="(double phi, mat &vbar, double nubar)" --> … … 55 58 void </td><td class="memItemRight" valign="bottom"><b>dupdate</b> (mat &v, double nu=1.0)</td></tr> 56 59 57 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a1a522504c7788dfd7fb733157ee39e"></a><!-- doxytag: member="enorm::tupdate" ref="2a1a522504c7788dfd7fb733157ee39e" args="()" -->58 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#2a1a522504c7788dfd7fb733157ee39e">tupdate</a> ()</td></tr>59 60 <tr><td class="mdescLeft"> </td><td class="mdescRight">tupdate used in KF <br></td></tr>61 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d1b0faf61260de09cf63bf823add5b32"></a><!-- doxytag: member="enorm::dupdate" ref="d1b0faf61260de09cf63bf823add5b32" args="()" -->62 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#d1b0faf61260de09cf63bf823add5b32">dupdate</a> ()</td></tr>63 64 <tr><td class="mdescLeft"> </td><td class="mdescRight">dupdate used in KF <br></td></tr>65 60 <tr><td class="memItemLeft" nowrap align="right" valign="top">vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">sample</a> ()</td></tr> 66 61 … … 73 68 74 69 <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute probability of argument <code>val</code>. <br></td></tr> 75 <tr><td colspan="2"><br><h2>Public Attributes</h2></td></tr> 76 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4de82a0d7ba9eaf31206318ae35d0d5"></a><!-- doxytag: member="enorm::RNG" ref="a4de82a0d7ba9eaf31206318ae35d0d5" args="" --> 77 Normal_RNG </td><td class="memItemRight" valign="bottom"><b>RNG</b></td></tr> 70 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9517594915e897584eaebbb057ed8881"></a><!-- doxytag: member="enorm::evalpdflog" ref="9517594915e897584eaebbb057ed8881" args="(const vec &val)" --> 71 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#9517594915e897584eaebbb057ed8881">evalpdflog</a> (const vec &val)</td></tr> 72 73 <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of argument <code>val</code>. <br></td></tr> 74 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="191c1220c3ddd0c5f54e78f19b57ebd5"></a><!-- doxytag: member="enorm::mean" ref="191c1220c3ddd0c5f54e78f19b57ebd5" args="()" --> 75 vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#191c1220c3ddd0c5f54e78f19b57ebd5">mean</a> ()</td></tr> 76 77 <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected value <br></td></tr> 78 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3be0cb541ec9b88e5aa3f60307bbc753"></a><!-- doxytag: member="enorm::_mu" ref="3be0cb541ec9b88e5aa3f60307bbc753" args="()" --> 79 vec * </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#3be0cb541ec9b88e5aa3f60307bbc753">_mu</a> ()</td></tr> 80 81 <tr><td class="mdescLeft"> </td><td class="mdescRight">returns a pointer to the internal mean value. Use with Care! <br></td></tr> 82 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8725c534863c4fc2bddef0edfb95a740"></a><!-- doxytag: member="enorm::_R" ref="8725c534863c4fc2bddef0edfb95a740" args="(sq_T *&pR, sq_T *&piR)" --> 83 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#8725c534863c4fc2bddef0edfb95a740">_R</a> (sq_T *&pR, sq_T *&piR)</td></tr> 84 85 <tr><td class="mdescLeft"> </td><td class="mdescRight">returns pointers to the internal variance and its inverse. Use with Care! <br></td></tr> 86 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c9ca4f2ca42568e40ca146168e7f3247"></a><!-- doxytag: member="enorm::_cached" ref="c9ca4f2ca42568e40ca146168e7f3247" args="(bool what)" --> 87 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#c9ca4f2ca42568e40ca146168e7f3247">_cached</a> (bool what)</td></tr> 88 89 <tr><td class="mdescLeft"> </td><td class="mdescRight">set cache as inconsistent <br></td></tr> 90 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 91 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="71fde0d54bba147e00f612577f95ad20"></a><!-- doxytag: member="enorm::mu" ref="71fde0d54bba147e00f612577f95ad20" args="" --> 92 vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">mu</a></td></tr> 93 94 <tr><td class="mdescLeft"> </td><td class="mdescRight">mean value <br></td></tr> 95 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4ccc8d8514d644ef1c98d8ab023748a1"></a><!-- doxytag: member="enorm::R" ref="4ccc8d8514d644ef1c98d8ab023748a1" args="" --> 96 sq_T </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">R</a></td></tr> 97 98 <tr><td class="mdescLeft"> </td><td class="mdescRight">Covariance matrix in decomposed form. <br></td></tr> 99 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="82f39ac49911d7097f4bfe385deba355"></a><!-- doxytag: member="enorm::_iR" ref="82f39ac49911d7097f4bfe385deba355" args="" --> 100 sq_T </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#82f39ac49911d7097f4bfe385deba355">_iR</a></td></tr> 101 102 <tr><td class="mdescLeft"> </td><td class="mdescRight">Cache: _iR = inv(R);. <br></td></tr> 103 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ae12db77283a96e0f14a3eae93dc3bf1"></a><!-- doxytag: member="enorm::cached" ref="ae12db77283a96e0f14a3eae93dc3bf1" args="" --> 104 bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1">cached</a></td></tr> 105 106 <tr><td class="mdescLeft"> </td><td class="mdescRight">indicator if <code>_iR</code> is chached <br></td></tr> 107 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6938fc390a19cdaf6ad4503fcbaada4e"></a><!-- doxytag: member="enorm::dim" ref="6938fc390a19cdaf6ad4503fcbaada4e" args="" --> 108 int </td><td class="memItemRight" valign="bottom"><a class="el" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e">dim</a></td></tr> 109 110 <tr><td class="mdescLeft"> </td><td class="mdescRight">dimension (redundant from rv.count() for easier coding ) <br></td></tr> 111 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74da992e3f5d598da8850b646b79b9d9"></a><!-- doxytag: member="enorm::rv" ref="74da992e3f5d598da8850b646b79b9d9" args="" --> 112 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>rv</b></td></tr> 78 113 79 114 </table> … … 112 147 <hr>The documentation for this class was generated from the following file:<ul> 113 148 <li>work/mixpp/bdm/stat/<a class="el" href="libEF_8h-source.html">libEF.h</a></ul> 114 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:432008 for mixpp by 149 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:48 2008 for mixpp by 115 150 <a href="http://www.doxygen.org/index.html"> 116 151 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classenorm__coll__graph.map ¶
r23 r32 4 4 <area shape="rect" title="rv" alt="" coords="27,31,35,39"> 5 5 <area shape="rect" title="rv" alt="" coords="27,99,35,107"> 6 <area shape="rect" title=" R" alt="" coords="93,207,101,215">7 <area shape="rect" title=" R" alt="" coords="77,275,85,283">6 <area shape="rect" title="_iR\nR" alt="" coords="95,207,103,215"> 7 <area shape="rect" title="_iR\nR" alt="" coords="77,291,85,299"> -
TabularUnified doc/html/classenorm__coll__graph.md5 ¶
r23 r32 1 30bcd8762324b938e74004bb47d2edfe 1 e13cae85b34037ab9a539a7c6bd2272f -
TabularUnified doc/html/classenorm__inherit__graph.map ¶
r23 r32 1 <area shape="rect" href="$classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="43,84,88,111"> 2 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="40,7,91,33"> 1 <area shape="rect" href="$classenorm.html" title="enorm\< ldmat \>" alt="" coords="5,263,136,289"> 2 <area shape="rect" title="\< ldmat \>" alt="" coords="67,191,75,199"> 3 <area shape="rect" title="\< ldmat \>" alt="" coords="67,259,75,267"> 4 <area shape="rect" href="$classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="48,87,93,113"> 5 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="45,7,96,33"> -
TabularUnified doc/html/classenorm__inherit__graph.md5 ¶
r23 r32 1 11dce2d22a9a02cd861d01ba8587e55e 1 061248f424677ea931318b513f9bb052 -
TabularUnified doc/html/classepdf-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>epdf Member List</h1>This is the complete list of members for <a class="el" href="classepdf.html">epdf</a>, including all inherited members.<p><table> 24 <tr class="memlist"><td><a class="el" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">epdf</a>()</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline]</code></td></tr> 25 <tr class="memlist"><td><a class="el" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">epdf</a>(const RV &rv0)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline]</code></td></tr> 24 26 <tr class="memlist"><td><a class="el" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">eval</a>(const vec &val)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline, virtual]</code></td></tr> 27 <tr class="memlist"><td><a class="el" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">evalpdflog</a>(const vec &val)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline, virtual]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef">mean</a>()=0</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [pure virtual]</code></td></tr> 29 <tr bgcolor="#f0f0f0"><td><b>rv</b> (defined in <a class="el" href="classepdf.html">epdf</a>)</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [protected]</code></td></tr> 25 30 <tr class="memlist"><td><a class="el" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa">sample</a>()=0</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [pure virtual]</code></td></tr> 26 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:44 2008 for mixpp by 31 <tr class="memlist"><td><a class="el" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">~epdf</a>()</td><td><a class="el" href="classepdf.html">epdf</a></td><td><code> [inline, virtual]</code></td></tr> 32 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:49 2008 for mixpp by 27 33 <a href="http://www.doxygen.org/index.html"> 28 34 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classepdf.html ¶
r28 r32 31 31 <p><center><img src="classepdf__inherit__graph.png" border="0" usemap="#epdf__inherit__map" alt="Inheritance graph"></center> 32 32 <map name="epdf__inherit__map"> 33 <area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords=" 43,84,88,111"><area shape="rect" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="5,161,125,188"></map>33 <area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="147,87,192,113"><area shape="rect" href="classeEmp.html" title="Weighted empirical density." alt="" coords="216,87,275,113"><area shape="rect" href="classemix.html" title="Weighted mixture of epdfs with external owned components." alt="" coords="299,87,352,113"><area shape="rect" href="classeuni.html" title="Uniform distributed density on a rectangular support." alt="" coords="376,87,424,113"><area shape="rect" href="classegamma.html" title="Gamma posterior density." alt="" coords="5,167,85,193"><area shape="rect" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="109,167,229,193"><area shape="rect" href="classenorm.html" title="enorm\< ldmat \>" alt="" coords="155,263,285,289"><area shape="rect" title="\< ldmat \>" alt="" coords="167,191,175,199"><area shape="rect" title="\< ldmat \>" alt="" coords="199,259,207,267"></map> 34 34 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 35 35 <div class="dynheader"> … … 45 45 <tr><td></td></tr> 46 46 <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> 47 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d8eb760037b3bad5a0d64081606697cd"></a><!-- doxytag: member="epdf::epdf" ref="d8eb760037b3bad5a0d64081606697cd" args="()" --> 48 </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">epdf</a> ()</td></tr> 49 50 <tr><td class="mdescLeft"> </td><td class="mdescRight">default constructor <br></td></tr> 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c95b1a27a8dd9507bb9a5a3cb2809c7a"></a><!-- doxytag: member="epdf::epdf" ref="c95b1a27a8dd9507bb9a5a3cb2809c7a" args="(const RV &rv0)" --> 52 </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">epdf</a> (const <a class="el" href="classRV.html">RV</a> &rv0)</td></tr> 53 54 <tr><td class="mdescLeft"> </td><td class="mdescRight">default constructor <br></td></tr> 47 55 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa">sample</a> ()=0</td></tr> 48 56 … … 52 60 53 61 <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute probability of argument <code>val</code>. <br></td></tr> 62 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="113c76c61d20e3f2a24ba322a73dfc51"></a><!-- doxytag: member="epdf::evalpdflog" ref="113c76c61d20e3f2a24ba322a73dfc51" args="(const vec &val)" --> 63 virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">evalpdflog</a> (const vec &val)</td></tr> 64 65 <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute log-probability of argument <code>val</code>. <br></td></tr> 66 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5b61fae74d370d2216576d598c1a74ef"></a><!-- doxytag: member="epdf::mean" ref="5b61fae74d370d2216576d598c1a74ef" args="()=0" --> 67 virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef">mean</a> ()=0</td></tr> 68 69 <tr><td class="mdescLeft"> </td><td class="mdescRight">return expected value <br></td></tr> 70 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a322dd106f04c0a2915e3d4f4227396"></a><!-- doxytag: member="epdf::~epdf" ref="0a322dd106f04c0a2915e3d4f4227396" args="()" --> 71 virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">~epdf</a> ()</td></tr> 72 73 <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> 74 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="74da992e3f5d598da8850b646b79b9d9"></a><!-- doxytag: member="epdf::rv" ref="74da992e3f5d598da8850b646b79b9d9" args="" --> 76 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><b>rv</b></td></tr> 77 54 78 </table> 55 79 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 74 98 <p> 75 99 Returns a sample from the density, <img class="formulaInl" alt="$x \sim epdf(rv)$" src="form_3.png"> 76 <p>Implemented in <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< sq_T ></a> .</p>100 <p>Implemented in <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< sq_T ></a>, <a class="el" href="classegamma.html#0a2186a586432c2c3f22d09c5341890f">egamma</a>, <a class="el" href="classemix.html#3eb9a8e12ce1c5c8a3ddb245354b6941">emix</a>, <a class="el" href="classeuni.html#0f71562e3e919aba823cb7d9d420ad4c">euni</a>, <a class="el" href="classeEmp.html#c9b44099a400579b88aff9f5afaf9c13">eEmp</a>, and <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< ldmat ></a>.</p> 77 101 78 102 </div> … … 80 104 <hr>The documentation for this class was generated from the following file:<ul> 81 105 <li>work/mixpp/bdm/stat/<a class="el" href="libBM_8h-source.html">libBM.h</a></ul> 82 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:432008 for mixpp by 106 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:49 2008 for mixpp by 83 107 <a href="http://www.doxygen.org/index.html"> 84 108 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classepdf__inherit__graph.map ¶
r23 r32 1 <area shape="rect" href="$classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="43,84,88,111"> 2 <area shape="rect" href="$classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="5,161,125,188"> 1 <area shape="rect" href="$classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="147,87,192,113"> 2 <area shape="rect" href="$classeEmp.html" title="Weighted empirical density." alt="" coords="216,87,275,113"> 3 <area shape="rect" href="$classemix.html" title="Weighted mixture of epdfs with external owned components." alt="" coords="299,87,352,113"> 4 <area shape="rect" href="$classeuni.html" title="Uniform distributed density on a rectangular support." alt="" coords="376,87,424,113"> 5 <area shape="rect" href="$classegamma.html" title="Gamma posterior density." alt="" coords="5,167,85,193"> 6 <area shape="rect" href="$classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="109,167,229,193"> 7 <area shape="rect" href="$classenorm.html" title="enorm\< ldmat \>" alt="" coords="155,263,285,289"> 8 <area shape="rect" title="\< ldmat \>" alt="" coords="167,191,175,199"> 9 <area shape="rect" title="\< ldmat \>" alt="" coords="199,259,207,267"> -
TabularUnified doc/html/classepdf__inherit__graph.md5 ¶
r23 r32 1 7be3800f050a429d545752f71af4def4 1 cb4ef050c276391640ca78baae1d370e -
TabularUnified doc/html/classfnc-members.html ¶
r28 r32 25 25 <tr bgcolor="#f0f0f0"><td><b>dimy</b> (defined in <a class="el" href="classfnc.html">fnc</a>)</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [protected]</code></td></tr> 26 26 <tr class="memlist"><td><a class="el" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">eval</a>(const vec &cond)</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [inline, virtual]</code></td></tr> 27 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:44 2008 for mixpp by 27 <tr class="memlist"><td><a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">~fnc</a>()</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [inline, virtual]</code></td></tr> 28 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:49 2008 for mixpp by 28 29 <a href="http://www.doxygen.org/index.html"> 29 30 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classfnc.html ¶
r28 r32 46 46 47 47 <tr><td class="mdescLeft"> </td><td class="mdescRight">access function <br></td></tr> 48 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="17164c202f6feee3d708b8caab6306ab"></a><!-- doxytag: member="fnc::~fnc" ref="17164c202f6feee3d708b8caab6306ab" args="()" --> 49 virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">~fnc</a> ()</td></tr> 50 51 <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> 48 52 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 49 53 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22d51d10a7901331167f64f80d1af8e9"></a><!-- doxytag: member="fnc::dimy" ref="22d51d10a7901331167f64f80d1af8e9" args="" --> … … 54 58 Class representing function $f(x)$ of variable $x$ represented by <code>rv</code>. <hr>The documentation for this class was generated from the following file:<ul> 55 59 <li>work/mixpp/bdm/stat/<a class="el" href="libBM_8h-source.html">libBM.h</a></ul> 56 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 60 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:49 2008 for mixpp by 57 61 <a href="http://www.doxygen.org/index.html"> 58 62 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classfsqmat-members.html ¶
r28 r32 25 25 <tr class="memlist"><td><a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b">cols</a>() const </td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [inline]</code></td></tr> 26 26 <tr bgcolor="#f0f0f0"><td><b>dim</b> (defined in <a class="el" href="classsqmat.html">sqmat</a>)</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [protected]</code></td></tr> 27 <tr bgcolor="#f0f0f0"><td><b>fsqmat</b>() (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td></td></tr> 27 <tr class="memlist"><td><a class="el" href="classfsqmat.html#79e3f73e0ccd663c7f7e08083d272940">fsqmat</a>()</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td></td></tr> 28 <tr class="memlist"><td><a class="el" href="classfsqmat.html#40eae99305e7c7240fa95cfec125b06f">fsqmat</a>(const int dim0)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td></td></tr> 28 29 <tr class="memlist"><td><a class="el" href="classfsqmat.html#1929fbc9fe375f1d67f979d0d302336f">fsqmat</a>(const mat &M)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td></td></tr> 29 30 <tr class="memlist"><td><a class="el" href="classfsqmat.html#9fa853e1ca28f2a1a1c43377e798ecb1">inv</a>(fsqmat &Inv)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [virtual]</code></td></tr> 30 <tr class="memlist"><td><a class="el" href="classfsqmat.html# bf212272ec195ad2706e2bf4d8e7c9b3">logdet</a>()</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline, virtual]</code></td></tr>31 <tr class="memlist"><td><a class="el" href="classfsqmat.html#eb0d1358f536e4453b5f99d0418ca1e5">logdet</a>() const </td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline, virtual]</code></td></tr> 31 32 <tr bgcolor="#f0f0f0"><td><b>M</b> (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [protected]</code></td></tr> 32 <tr class="memlist"><td><a class="el" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518">mult_sym</a>(const mat &C, bool trans=false)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [virtual]</code></td></tr> 33 <tr bgcolor="#f0f0f0"><td><b>mult_sym</b>(const mat &C, fsqmat &U, bool trans=false) (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td></td></tr> 33 <tr class="memlist"><td><a class="el" href="classfsqmat.html#5530d2756b5d991de755e6121c9a452e">mult_sym</a>(const mat &C)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [virtual]</code></td></tr> 34 <tr bgcolor="#f0f0f0"><td><b>mult_sym</b>(const mat &C, fsqmat &U) (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td></td></tr> 35 <tr class="memlist"><td><a class="el" href="classfsqmat.html#92052a8adc2054b63e42d1373d145c89">mult_sym_t</a>(const mat &C)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [virtual]</code></td></tr> 36 <tr bgcolor="#f0f0f0"><td><b>mult_sym_t</b>(const mat &C, fsqmat &U) (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td></td></tr> 34 37 <tr bgcolor="#f0f0f0"><td><b>operator *=</b>(double x) (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline]</code></td></tr> 35 38 <tr bgcolor="#f0f0f0"><td><b>operator+=</b>(const fsqmat &A) (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline]</code></td></tr> 36 39 <tr bgcolor="#f0f0f0"><td><b>operator-=</b>(const fsqmat &A) (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline]</code></td></tr> 40 <tr bgcolor="#f0f0f0"><td><b>operator<<</b> (defined in <a class="el" href="classfsqmat.html">fsqmat</a>)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [friend]</code></td></tr> 37 41 <tr class="memlist"><td><a class="el" href="classfsqmat.html#b36530e155667fe9f1bd58394e50c65a">opupdt</a>(const vec &v, double w)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [virtual]</code></td></tr> 38 <tr class="memlist"><td><a class="el" href="classfsqmat.html# 6d047b9f7a27dfc093303a13cc9b1fba">qform</a>(vec &v)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline, virtual]</code></td></tr>42 <tr class="memlist"><td><a class="el" href="classfsqmat.html#1eec8762a2299d83c7b7cd6bf6cbc1ad">qform</a>(const vec &v)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline, virtual]</code></td></tr> 39 43 <tr class="memlist"><td><a class="el" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646">rows</a>() const </td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [inline]</code></td></tr> 40 <tr class="memlist"><td><a class="el" href="classfsqmat.html# 6648dd4291b809cce14e8497d0433ad3">sqrt_mult</a>(vec &v)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline, virtual]</code></td></tr>44 <tr class="memlist"><td><a class="el" href="classfsqmat.html#2288389e2d47bd9df112815ef570c5c9">sqrt_mult</a>(const vec &v)</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline, virtual]</code></td></tr> 41 45 <tr class="memlist"><td><a class="el" href="classfsqmat.html#cedf4f048309056f4262c930914dfda8">to_mat</a>()</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [virtual]</code></td></tr> 42 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:44 2008 for mixpp by 46 <tr class="memlist"><td><a class="el" href="classfsqmat.html#2a8f104e4befbc2aa90d8b11edfedb2e">~fsqmat</a>()</td><td><a class="el" href="classfsqmat.html">fsqmat</a></td><td><code> [inline, virtual]</code></td></tr> 47 <tr class="memlist"><td><a class="el" href="classsqmat.html#0481f2067bb32aaea7e6d4f27e46b656">~sqmat</a>()</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [inline, virtual]</code></td></tr> 48 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:49 2008 for mixpp by 43 49 <a href="http://www.doxygen.org/index.html"> 44 50 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classfsqmat.html ¶
r28 r32 51 51 52 52 <tr><td class="mdescLeft"> </td><td class="mdescRight">Conversion to full matrix. <br></td></tr> 53 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518">mult_sym</a> (const mat &C, bool trans=false)</td></tr> 54 55 <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. <a href="#acc5d2d0a243f1de6d0106065f01f518"></a><br></td></tr> 56 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ccf5ad8fb038f82e9d2201c0606b65fa"></a><!-- doxytag: member="fsqmat::mult_sym" ref="ccf5ad8fb038f82e9d2201c0606b65fa" args="(const mat &C, fsqmat &U, bool trans=false)" --> 57 void </td><td class="memItemRight" valign="bottom"><b>mult_sym</b> (const mat &C, <a class="el" href="classfsqmat.html">fsqmat</a> &U, bool trans=false)</td></tr> 53 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#5530d2756b5d991de755e6121c9a452e">mult_sym</a> (const mat &C)</td></tr> 54 55 <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. <a href="#5530d2756b5d991de755e6121c9a452e"></a><br></td></tr> 56 <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#92052a8adc2054b63e42d1373d145c89">mult_sym_t</a> (const mat &C)</td></tr> 57 58 <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$. <a href="#92052a8adc2054b63e42d1373d145c89"></a><br></td></tr> 59 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cfea3618d426e2b8232f09aa0070266f"></a><!-- doxytag: member="fsqmat::mult_sym" ref="cfea3618d426e2b8232f09aa0070266f" args="(const mat &C, fsqmat &U)" --> 60 void </td><td class="memItemRight" valign="bottom"><b>mult_sym</b> (const mat &C, <a class="el" href="classfsqmat.html">fsqmat</a> &U)</td></tr> 61 62 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7ca865c68989d22903efe97045cb6c9a"></a><!-- doxytag: member="fsqmat::mult_sym_t" ref="7ca865c68989d22903efe97045cb6c9a" args="(const mat &C, fsqmat &U)" --> 63 void </td><td class="memItemRight" valign="bottom"><b>mult_sym_t</b> (const mat &C, <a class="el" href="classfsqmat.html">fsqmat</a> &U)</td></tr> 58 64 59 65 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cfa4c359483d2322f32d1d50050f8ac4"></a><!-- doxytag: member="fsqmat::clear" ref="cfa4c359483d2322f32d1d50050f8ac4" args="()" --> … … 61 67 62 68 <tr><td class="mdescLeft"> </td><td class="mdescRight">Clearing matrix so that it corresponds to zeros. <br></td></tr> 69 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="79e3f73e0ccd663c7f7e08083d272940"></a><!-- doxytag: member="fsqmat::fsqmat" ref="79e3f73e0ccd663c7f7e08083d272940" args="()" --> 70 </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#79e3f73e0ccd663c7f7e08083d272940">fsqmat</a> ()</td></tr> 71 72 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default initialization. <br></td></tr> 73 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40eae99305e7c7240fa95cfec125b06f"></a><!-- doxytag: member="fsqmat::fsqmat" ref="40eae99305e7c7240fa95cfec125b06f" args="(const int dim0)" --> 74 </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#40eae99305e7c7240fa95cfec125b06f">fsqmat</a> (const int dim0)</td></tr> 75 76 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default initialization with proper size. <br></td></tr> 63 77 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1929fbc9fe375f1d67f979d0d302336f"></a><!-- doxytag: member="fsqmat::fsqmat" ref="1929fbc9fe375f1d67f979d0d302336f" args="(const mat &M)" --> 64 78 </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#1929fbc9fe375f1d67f979d0d302336f">fsqmat</a> (const mat &M)</td></tr> 65 79 66 80 <tr><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <br></td></tr> 81 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2a8f104e4befbc2aa90d8b11edfedb2e"></a><!-- doxytag: member="fsqmat::~fsqmat" ref="2a8f104e4befbc2aa90d8b11edfedb2e" args="()" --> 82 virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#2a8f104e4befbc2aa90d8b11edfedb2e">~fsqmat</a> ()</td></tr> 83 84 <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> 67 85 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#9fa853e1ca28f2a1a1c43377e798ecb1">inv</a> (<a class="el" href="classfsqmat.html">fsqmat</a> &Inv)</td></tr> 68 86 69 87 <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix inversion preserving the chosen form. <a href="#9fa853e1ca28f2a1a1c43377e798ecb1"></a><br></td></tr> 70 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" bf212272ec195ad2706e2bf4d8e7c9b3"></a><!-- doxytag: member="fsqmat::logdet" ref="bf212272ec195ad2706e2bf4d8e7c9b3" args="()" -->71 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html# bf212272ec195ad2706e2bf4d8e7c9b3">logdet</a> ()</td></tr>88 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eb0d1358f536e4453b5f99d0418ca1e5"></a><!-- doxytag: member="fsqmat::logdet" ref="eb0d1358f536e4453b5f99d0418ca1e5" args="() const " --> 89 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#eb0d1358f536e4453b5f99d0418ca1e5">logdet</a> () const </td></tr> 72 90 73 91 <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of a determinant. <br></td></tr> 74 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 6d047b9f7a27dfc093303a13cc9b1fba"></a><!-- doxytag: member="fsqmat::qform" ref="6d047b9f7a27dfc093303a13cc9b1fba" args="(vec &v)" -->75 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html# 6d047b9f7a27dfc093303a13cc9b1fba">qform</a> (vec &v)</td></tr>92 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1eec8762a2299d83c7b7cd6bf6cbc1ad"></a><!-- doxytag: member="fsqmat::qform" ref="1eec8762a2299d83c7b7cd6bf6cbc1ad" args="(const vec &v)" --> 93 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#1eec8762a2299d83c7b7cd6bf6cbc1ad">qform</a> (const vec &v)</td></tr> 76 94 77 95 <tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluates quadratic form $x= v'*V*v$;. <br></td></tr> 78 <tr><td class="memItemLeft" nowrap align="right" valign="top">vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html# 6648dd4291b809cce14e8497d0433ad3">sqrt_mult</a> (vec &v)</td></tr>79 80 <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplies square root of $V$ by vector $x$. <a href="# 6648dd4291b809cce14e8497d0433ad3"></a><br></td></tr>96 <tr><td class="memItemLeft" nowrap align="right" valign="top">vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classfsqmat.html#2288389e2d47bd9df112815ef570c5c9">sqrt_mult</a> (const vec &v)</td></tr> 97 98 <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplies square root of $V$ by vector $x$. <a href="#2288389e2d47bd9df112815ef570c5c9"></a><br></td></tr> 81 99 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="514d1fdd8a382dbd6a774f2cf1ebd3de"></a><!-- doxytag: member="fsqmat::operator+=" ref="514d1fdd8a382dbd6a774f2cf1ebd3de" args="(const fsqmat &A)" --> 82 100 <a class="el" href="classfsqmat.html">fsqmat</a> & </td><td class="memItemRight" valign="bottom"><b>operator+=</b> (const <a class="el" href="classfsqmat.html">fsqmat</a> &A)</td></tr> … … 103 121 int </td><td class="memItemRight" valign="bottom"><b>dim</b></td></tr> 104 122 123 <tr><td colspan="2"><br><h2>Friends</h2></td></tr> 124 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e06aba54d61e807b41bd68b5ee6ac22f"></a><!-- doxytag: member="fsqmat::operator<<" ref="e06aba54d61e807b41bd68b5ee6ac22f" args="(std::ostream &os, const fsqmat &sq)" --> 125 std::ostream & </td><td class="memItemRight" valign="bottom"><b>operator<<</b> (std::ostream &os, const <a class="el" href="classfsqmat.html">fsqmat</a> &sq)</td></tr> 126 105 127 </table> 106 128 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 145 167 </div> 146 168 </div><p> 147 <a class="anchor" name=" acc5d2d0a243f1de6d0106065f01f518"></a><!-- doxytag: member="fsqmat::mult_sym" ref="acc5d2d0a243f1de6d0106065f01f518" args="(const mat &C, bool trans=false)" -->169 <a class="anchor" name="5530d2756b5d991de755e6121c9a452e"></a><!-- doxytag: member="fsqmat::mult_sym" ref="5530d2756b5d991de755e6121c9a452e" args="(const mat &C)" --> 148 170 <div class="memitem"> 149 171 <div class="memproto"> … … 153 175 <td>(</td> 154 176 <td class="paramtype">const mat & </td> 155 <td class="paramname"> <em>C</em>, </td> 156 </tr> 157 <tr> 158 <td class="paramkey"></td> 159 <td></td> 160 <td class="paramtype">bool </td> 161 <td class="paramname"> <em>trans</em> = <code>false</code></td><td> </td> 162 </tr> 163 <tr> 164 <td></td> 165 <td>)</td> 166 <td></td><td></td><td width="100%"><code> [virtual]</code></td> 177 <td class="paramname"> <em>C</em> </td> 178 <td> ) </td> 179 <td width="100%"><code> [virtual]</code></td> 167 180 </tr> 168 181 </table> … … 176 189 <table border="0" cellspacing="2" cellpadding="0"> 177 190 <tr><td valign="top"></td><td valign="top"><em>C</em> </td><td>multiplying matrix, </td></tr> 178 <tr><td valign="top"></td><td valign="top"><em>trans</em> </td><td>if true, product $V = C'*V*C$ will be computed instead; </td></tr> 179 </table> 180 </dl> 181 182 <p>Implements <a class="el" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157">sqmat</a>.</p> 191 </table> 192 </dl> 193 194 <p>Implements <a class="el" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa">sqmat</a>.</p> 195 196 </div> 197 </div><p> 198 <a class="anchor" name="92052a8adc2054b63e42d1373d145c89"></a><!-- doxytag: member="fsqmat::mult_sym_t" ref="92052a8adc2054b63e42d1373d145c89" args="(const mat &C)" --> 199 <div class="memitem"> 200 <div class="memproto"> 201 <table class="memname"> 202 <tr> 203 <td class="memname">void fsqmat::mult_sym_t </td> 204 <td>(</td> 205 <td class="paramtype">const mat & </td> 206 <td class="paramname"> <em>C</em> </td> 207 <td> ) </td> 208 <td width="100%"><code> [virtual]</code></td> 209 </tr> 210 </table> 211 </div> 212 <div class="memdoc"> 213 214 <p> 215 Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$. 216 <p> 217 <dl compact><dt><b>Parameters:</b></dt><dd> 218 <table border="0" cellspacing="2" cellpadding="0"> 219 <tr><td valign="top"></td><td valign="top"><em>C</em> </td><td>multiplying matrix, </td></tr> 220 </table> 221 </dl> 222 223 <p>Implements <a class="el" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325">sqmat</a>.</p> 183 224 184 225 </div> … … 211 252 </div> 212 253 </div><p> 213 <a class="anchor" name=" 6648dd4291b809cce14e8497d0433ad3"></a><!-- doxytag: member="fsqmat::sqrt_mult" ref="6648dd4291b809cce14e8497d0433ad3" args="(vec &v)" -->254 <a class="anchor" name="2288389e2d47bd9df112815ef570c5c9"></a><!-- doxytag: member="fsqmat::sqrt_mult" ref="2288389e2d47bd9df112815ef570c5c9" args="(const vec &v)" --> 214 255 <div class="memitem"> 215 256 <div class="memproto"> … … 218 259 <td class="memname">vec fsqmat::sqrt_mult </td> 219 260 <td>(</td> 220 <td class="paramtype"> vec & </td>261 <td class="paramtype">const vec & </td> 221 262 <td class="paramname"> <em>v</em> </td> 222 263 <td> ) </td> … … 231 272 <p> 232 273 Used e.g. in generating normal samples. 233 <p>Implements <a class="el" href="classsqmat.html# b5236c8a050199e1a9d338b0da1a08d2">sqmat</a>.</p>274 <p>Implements <a class="el" href="classsqmat.html#975ddc7e8035d8d4e6cbd52dd99c248c">sqmat</a>.</p> 234 275 235 276 </div> … … 237 278 <hr>The documentation for this class was generated from the following files:<ul> 238 279 <li>work/mixpp/bdm/math/<a class="el" href="libDC_8h-source.html">libDC.h</a><li>work/mixpp/bdm/math/libDC.cpp<li>work/mixpp/bdm/math/libDC_.cpp</ul> 239 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 280 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:49 2008 for mixpp by 240 281 <a href="http://www.doxygen.org/index.html"> 241 282 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classlinfn-members.html ¶
r28 r32 30 30 <tr bgcolor="#f0f0f0"><td><b>linfn</b>(const RV &rv0, const mat &A0) (defined in <a class="el" href="classlinfn.html">linfn</a>)</td><td><a class="el" href="classlinfn.html">linfn</a></td><td><code> [inline]</code></td></tr> 31 31 <tr bgcolor="#f0f0f0"><td><b>linfn</b>(const RV &rv0, const mat &A0, const vec &B0) (defined in <a class="el" href="classlinfn.html">linfn</a>)</td><td><a class="el" href="classlinfn.html">linfn</a></td><td><code> [inline]</code></td></tr> 32 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:44 2008 for mixpp by 32 <tr class="memlist"><td><a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">~fnc</a>()</td><td><a class="el" href="classfnc.html">fnc</a></td><td><code> [inline, virtual]</code></td></tr> 33 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:52 2008 for mixpp by 33 34 <a href="http://www.doxygen.org/index.html"> 34 35 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classlinfn.html ¶
r28 r32 76 76 Class representing function $f(x) = Ax+B$. <hr>The documentation for this class was generated from the following files:<ul> 77 77 <li>work/mixpp/bdm/stat/<a class="el" href="libFN_8h-source.html">libFN.h</a><li>work/mixpp/bdm/stat/libFN.cpp</ul> 78 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 78 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:52 2008 for mixpp by 79 79 <a href="http://www.doxygen.org/index.html"> 80 80 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classmpdf-members.html ¶
r28 r32 22 22 </div> 23 23 <h1>mpdf Member List</h1>This is the complete list of members for <a class="el" href="classmpdf.html">mpdf</a>, including all inherited members.<p><table> 24 <tr bgcolor="#f0f0f0"><td><b>condition</b>(vec &cond) (defined in <a class="el" href="classmpdf.html">mpdf</a>)</td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [inline, virtual]</code></td></tr> 24 <tr bgcolor="#f0f0f0"><td><b>condition</b>(const vec &cond) (defined in <a class="el" href="classmpdf.html">mpdf</a>)</td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [inline, virtual]</code></td></tr> 25 <tr class="memlist"><td><a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">ep</a></td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [protected]</code></td></tr> 26 <tr bgcolor="#f0f0f0"><td><b>evalcond</b>(const vec &dt, const vec &cond) (defined in <a class="el" href="classmpdf.html">mpdf</a>)</td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [inline, virtual]</code></td></tr> 27 <tr class="memlist"><td><a class="el" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">mpdf</a>(const RV &rv0, const RV &rvc0)</td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [inline]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a></td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [protected]</code></td></tr> 29 <tr class="memlist"><td><a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a></td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [protected]</code></td></tr> 25 30 <tr class="memlist"><td><a class="el" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">samplecond</a>(vec &cond, double lik)</td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [inline, virtual]</code></td></tr> 26 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:44 2008 for mixpp by 31 <tr class="memlist"><td><a class="el" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">~mpdf</a>()</td><td><a class="el" href="classmpdf.html">mpdf</a></td><td><code> [inline, virtual]</code></td></tr> 32 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:53 2008 for mixpp by 27 33 <a href="http://www.doxygen.org/index.html"> 28 34 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classmpdf.html ¶
r28 r32 36 36 <p><center><img src="classmpdf__coll__graph.png" border="0" usemap="#mpdf__coll__map" alt="Collaboration graph"></center> 37 37 <map name="mpdf__coll__map"> 38 <area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords=" 15,7,52,33"><area shape="rect" title="rv\nrvc" alt="" coords="29,31,37,39"><area shape="rect" title="rv\nrvc" alt="" coords="29,115,37,123"></map>38 <area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="21,7,59,33"><area shape="rect" title="rv\nrvc" alt="" coords="32,31,40,39"><area shape="rect" title="rv\nrvc" alt="" coords="27,200,35,208"><area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="56,105,107,132"><area shape="rect" title="rv" alt="" coords="43,31,51,39"><area shape="rect" title="rv" alt="" coords="72,101,80,109"><area shape="rect" title="ep" alt="" coords="71,129,79,137"><area shape="rect" title="ep" alt="" coords="36,200,44,208"></map> 39 39 <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div> 40 40 … … 46 46 47 47 <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. <a href="#c20c796f8d0a201f0897299150e45a41"></a><br></td></tr> 48 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" cfb3dffef7c03598622e414668bb0588"></a><!-- doxytag: member="mpdf::condition" ref="cfb3dffef7c03598622e414668bb0588" args="(vec &cond)" -->49 virtual void </td><td class="memItemRight" valign="bottom"><b>condition</b> ( vec &cond)</td></tr>48 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f95a0cc6ab40611f46804682446ed83"></a><!-- doxytag: member="mpdf::condition" ref="0f95a0cc6ab40611f46804682446ed83" args="(const vec &cond)" --> 49 virtual void </td><td class="memItemRight" valign="bottom"><b>condition</b> (const vec &cond)</td></tr> 50 50 51 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80b738ece5bd4f8c4edaee4b38906f91"></a><!-- doxytag: member="mpdf::evalcond" ref="80b738ece5bd4f8c4edaee4b38906f91" args="(const vec &dt, const vec &cond)" --> 52 virtual double </td><td class="memItemRight" valign="bottom"><b>evalcond</b> (const vec &dt, const vec &cond)</td></tr> 53 54 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6788be9f3a888796499c5293a318fcfb"></a><!-- doxytag: member="mpdf::~mpdf" ref="6788be9f3a888796499c5293a318fcfb" args="()" --> 55 virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">~mpdf</a> ()</td></tr> 56 57 <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> 58 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="581ecf362185d37c08bb31cb9d046d6f"></a><!-- doxytag: member="mpdf::mpdf" ref="581ecf362185d37c08bb31cb9d046d6f" args="(const RV &rv0, const RV &rvc0)" --> 59 </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">mpdf</a> (const <a class="el" href="classRV.html">RV</a> &rv0, const <a class="el" href="classRV.html">RV</a> &rvc0)</td></tr> 60 61 <tr><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br></td></tr> 62 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 63 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6687c07ff07d47812dd565368ca59eb"></a><!-- doxytag: member="mpdf::rv" ref="f6687c07ff07d47812dd565368ca59eb" args="" --> 64 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">rv</a></td></tr> 65 66 <tr><td class="mdescLeft"> </td><td class="mdescRight">modeled random variable <br></td></tr> 67 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="acb7dda792b3cd5576f39fa3129abbab"></a><!-- doxytag: member="mpdf::rvc" ref="acb7dda792b3cd5576f39fa3129abbab" args="" --> 68 <a class="el" href="classRV.html">RV</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">rvc</a></td></tr> 69 70 <tr><td class="mdescLeft"> </td><td class="mdescRight">random variable in condition <br></td></tr> 71 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7aa894208a32f3487827df6d5054424c"></a><!-- doxytag: member="mpdf::ep" ref="7aa894208a32f3487827df6d5054424c" args="" --> 72 <a class="el" href="classepdf.html">epdf</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">ep</a></td></tr> 73 74 <tr><td class="mdescLeft"> </td><td class="mdescRight">pointer to internal <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> <br></td></tr> 51 75 </table> 52 76 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 80 104 Returns the required moment of the <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>. 81 105 <p> 82 Returns a sample from the density conditioned on <code>cond</code>, $x <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>(rv|cond)$ 106 Returns a sample from the density conditioned on <code>cond</code>, $x <a class="el" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>(rv|cond)$. <dl compact><dt><b>Parameters:</b></dt><dd> 107 <table border="0" cellspacing="2" cellpadding="0"> 108 <tr><td valign="top"></td><td valign="top"><em>lik</em> </td><td>is a return value of likelihood of the sample. </td></tr> 109 </table> 110 </dl> 111 83 112 </div> 84 113 </div><p> 85 114 <hr>The documentation for this class was generated from the following file:<ul> 86 115 <li>work/mixpp/bdm/stat/<a class="el" href="libBM_8h-source.html">libBM.h</a></ul> 87 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:442008 for mixpp by 116 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:53 2008 for mixpp by 88 117 <a href="http://www.doxygen.org/index.html"> 89 118 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classmpdf__coll__graph.map ¶
r23 r32 1 <area shape="rect" href="$classRV.html" title="Class representing variables, most often random variables." alt="" coords="15,7,52,33"> 2 <area shape="rect" title="rv\nrvc" alt="" coords="29,31,37,39"> 3 <area shape="rect" title="rv\nrvc" alt="" coords="29,115,37,123"> 1 <area shape="rect" href="$classRV.html" title="Class representing variables, most often random variables." alt="" coords="21,7,59,33"> 2 <area shape="rect" title="rv\nrvc" alt="" coords="32,31,40,39"> 3 <area shape="rect" title="rv\nrvc" alt="" coords="27,200,35,208"> 4 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="56,105,107,132"> 5 <area shape="rect" title="rv" alt="" coords="43,31,51,39"> 6 <area shape="rect" title="rv" alt="" coords="72,101,80,109"> 7 <area shape="rect" title="ep" alt="" coords="71,129,79,137"> 8 <area shape="rect" title="ep" alt="" coords="36,200,44,208"> -
TabularUnified doc/html/classmpdf__coll__graph.md5 ¶
r23 r32 1 6f3f8686fa33512cb157ef3d03b643be 1 8c71f87af6165717b18383921af58e33 -
TabularUnified doc/html/classsqmat-members.html ¶
r28 r32 25 25 <tr class="memlist"><td><a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b">cols</a>() const </td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [inline]</code></td></tr> 26 26 <tr bgcolor="#f0f0f0"><td><b>dim</b> (defined in <a class="el" href="classsqmat.html">sqmat</a>)</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [protected]</code></td></tr> 27 <tr class="memlist"><td><a class="el" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547">logdet</a>()=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157">mult_sym</a>(const mat &C, bool trans=true)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 27 <tr class="memlist"><td><a class="el" href="classsqmat.html#0a772b396750eeeed85d69fa72478b45">logdet</a>() const =0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 28 <tr class="memlist"><td><a class="el" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa">mult_sym</a>(const mat &C)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 29 <tr class="memlist"><td><a class="el" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325">mult_sym_t</a>(const mat &C)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 29 30 <tr class="memlist"><td><a class="el" href="classsqmat.html#b223484796661f2dadb5607a86ce0581">opupdt</a>(const vec &v, double w)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 30 <tr class="memlist"><td><a class="el" href="classsqmat.html# 44e079468bc8bfccf634dc85b32ba6be">qform</a>(vec &v)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr>31 <tr class="memlist"><td><a class="el" href="classsqmat.html#90f97cdf9de08ead4f0648419b3aa4ce">qform</a>(const vec &v)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 31 32 <tr class="memlist"><td><a class="el" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646">rows</a>() const </td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [inline]</code></td></tr> 32 <tr class="memlist"><td><a class="el" href="classsqmat.html# b5236c8a050199e1a9d338b0da1a08d2">sqrt_mult</a>(vec &v)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr>33 <tr class="memlist"><td><a class="el" href="classsqmat.html#975ddc7e8035d8d4e6cbd52dd99c248c">sqrt_mult</a>(const vec &v)=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 33 34 <tr class="memlist"><td><a class="el" href="classsqmat.html#9a5b6fddfeb42339e1dc9b978a2590fc">to_mat</a>()=0</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [pure virtual]</code></td></tr> 34 </table><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:45 2008 for mixpp by 35 <tr class="memlist"><td><a class="el" href="classsqmat.html#0481f2067bb32aaea7e6d4f27e46b656">~sqmat</a>()</td><td><a class="el" href="classsqmat.html">sqmat</a></td><td><code> [inline, virtual]</code></td></tr> 36 </table><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:56 2008 for mixpp by 35 37 <a href="http://www.doxygen.org/index.html"> 36 38 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/classsqmat.html ¶
r28 r32 44 44 45 45 <tr><td class="mdescLeft"> </td><td class="mdescRight">Conversion to full matrix. <br></td></tr> 46 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157">mult_sym</a> (const mat &C, bool trans=true)=0</td></tr> 47 48 <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. <a href="#faa3bc90be142adde9cf74f573c70157"></a><br></td></tr> 49 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5c852819589f74cdaefbd648c0ce8547"></a><!-- doxytag: member="sqmat::logdet" ref="5c852819589f74cdaefbd648c0ce8547" args="()=0" --> 50 virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547">logdet</a> ()=0</td></tr> 46 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa">mult_sym</a> (const mat &C)=0</td></tr> 47 48 <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C'$. <a href="#60fbbfa9e483b8187c135f787ee53afa"></a><br></td></tr> 49 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325">mult_sym_t</a> (const mat &C)=0</td></tr> 50 51 <tr><td class="mdescLeft"> </td><td class="mdescRight">Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$. <a href="#6909e906da17725b1b80f3cae7cf3325"></a><br></td></tr> 52 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0a772b396750eeeed85d69fa72478b45"></a><!-- doxytag: member="sqmat::logdet" ref="0a772b396750eeeed85d69fa72478b45" args="() const =0" --> 53 virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#0a772b396750eeeed85d69fa72478b45">logdet</a> () const =0</td></tr> 51 54 52 55 <tr><td class="mdescLeft"> </td><td class="mdescRight">Logarithm of a determinant. <br></td></tr> 53 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html# b5236c8a050199e1a9d338b0da1a08d2">sqrt_mult</a> (vec &v)=0</td></tr>54 55 <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplies square root of $V$ by vector $x$. <a href="# b5236c8a050199e1a9d338b0da1a08d2"></a><br></td></tr>56 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name=" 44e079468bc8bfccf634dc85b32ba6be"></a><!-- doxytag: member="sqmat::qform" ref="44e079468bc8bfccf634dc85b32ba6be" args="(vec &v)=0" -->57 virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html# 44e079468bc8bfccf634dc85b32ba6be">qform</a> (vec &v)=0</td></tr>56 <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual vec </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#975ddc7e8035d8d4e6cbd52dd99c248c">sqrt_mult</a> (const vec &v)=0</td></tr> 57 58 <tr><td class="mdescLeft"> </td><td class="mdescRight">Multiplies square root of $V$ by vector $x$. <a href="#975ddc7e8035d8d4e6cbd52dd99c248c"></a><br></td></tr> 59 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="90f97cdf9de08ead4f0648419b3aa4ce"></a><!-- doxytag: member="sqmat::qform" ref="90f97cdf9de08ead4f0648419b3aa4ce" args="(const vec &v)=0" --> 60 virtual double </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#90f97cdf9de08ead4f0648419b3aa4ce">qform</a> (const vec &v)=0</td></tr> 58 61 59 62 <tr><td class="mdescLeft"> </td><td class="mdescRight">Evaluates quadratic form $x= v'*V*v$;. <br></td></tr> … … 70 73 71 74 <tr><td class="mdescLeft"> </td><td class="mdescRight">Reimplementing common functions of mat: <a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols()</a>. <br></td></tr> 75 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0481f2067bb32aaea7e6d4f27e46b656"></a><!-- doxytag: member="sqmat::~sqmat" ref="0481f2067bb32aaea7e6d4f27e46b656" args="()" --> 76 virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classsqmat.html#0481f2067bb32aaea7e6d4f27e46b656">~sqmat</a> ()</td></tr> 77 78 <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor for future use;. <br></td></tr> 72 79 <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> 73 80 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0abed904bdc0882373ba9adba919689d"></a><!-- doxytag: member="sqmat::dim" ref="0abed904bdc0882373ba9adba919689d" args="" --> … … 116 123 </div> 117 124 </div><p> 118 <a class="anchor" name=" faa3bc90be142adde9cf74f573c70157"></a><!-- doxytag: member="sqmat::mult_sym" ref="faa3bc90be142adde9cf74f573c70157" args="(const mat &C, bool trans=true)=0" -->125 <a class="anchor" name="60fbbfa9e483b8187c135f787ee53afa"></a><!-- doxytag: member="sqmat::mult_sym" ref="60fbbfa9e483b8187c135f787ee53afa" args="(const mat &C)=0" --> 119 126 <div class="memitem"> 120 127 <div class="memproto"> … … 124 131 <td>(</td> 125 132 <td class="paramtype">const mat & </td> 126 <td class="paramname"> <em>C</em>, </td> 127 </tr> 128 <tr> 129 <td class="paramkey"></td> 130 <td></td> 131 <td class="paramtype">bool </td> 132 <td class="paramname"> <em>trans</em> = <code>true</code></td><td> </td> 133 </tr> 134 <tr> 135 <td></td> 136 <td>)</td> 137 <td></td><td></td><td width="100%"><code> [pure virtual]</code></td> 133 <td class="paramname"> <em>C</em> </td> 134 <td> ) </td> 135 <td width="100%"><code> [pure virtual]</code></td> 138 136 </tr> 139 137 </table> … … 147 145 <table border="0" cellspacing="2" cellpadding="0"> 148 146 <tr><td valign="top"></td><td valign="top"><em>C</em> </td><td>multiplying matrix, </td></tr> 149 <tr><td valign="top"></td><td valign="top"><em>trans</em> </td><td>if true, product $V = C'*V*C$ will be computed instead; </td></tr>150 147 </table> 151 148 </dl> 152 149 153 <p>Implemented in <a class="el" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518">fsqmat</a>.</p> 154 155 </div> 156 </div><p> 157 <a class="anchor" name="b5236c8a050199e1a9d338b0da1a08d2"></a><!-- doxytag: member="sqmat::sqrt_mult" ref="b5236c8a050199e1a9d338b0da1a08d2" args="(vec &v)=0" --> 150 <p>Implemented in <a class="el" href="classfsqmat.html#5530d2756b5d991de755e6121c9a452e">fsqmat</a>.</p> 151 152 </div> 153 </div><p> 154 <a class="anchor" name="6909e906da17725b1b80f3cae7cf3325"></a><!-- doxytag: member="sqmat::mult_sym_t" ref="6909e906da17725b1b80f3cae7cf3325" args="(const mat &C)=0" --> 155 <div class="memitem"> 156 <div class="memproto"> 157 <table class="memname"> 158 <tr> 159 <td class="memname">virtual void sqmat::mult_sym_t </td> 160 <td>(</td> 161 <td class="paramtype">const mat & </td> 162 <td class="paramname"> <em>C</em> </td> 163 <td> ) </td> 164 <td width="100%"><code> [pure virtual]</code></td> 165 </tr> 166 </table> 167 </div> 168 <div class="memdoc"> 169 170 <p> 171 Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C'*V*C$. 172 <p> 173 <dl compact><dt><b>Parameters:</b></dt><dd> 174 <table border="0" cellspacing="2" cellpadding="0"> 175 <tr><td valign="top"></td><td valign="top"><em>C</em> </td><td>multiplying matrix, </td></tr> 176 </table> 177 </dl> 178 179 <p>Implemented in <a class="el" href="classfsqmat.html#92052a8adc2054b63e42d1373d145c89">fsqmat</a>.</p> 180 181 </div> 182 </div><p> 183 <a class="anchor" name="975ddc7e8035d8d4e6cbd52dd99c248c"></a><!-- doxytag: member="sqmat::sqrt_mult" ref="975ddc7e8035d8d4e6cbd52dd99c248c" args="(const vec &v)=0" --> 158 184 <div class="memitem"> 159 185 <div class="memproto"> … … 162 188 <td class="memname">virtual vec sqmat::sqrt_mult </td> 163 189 <td>(</td> 164 <td class="paramtype"> vec & </td>190 <td class="paramtype">const vec & </td> 165 191 <td class="paramname"> <em>v</em> </td> 166 192 <td> ) </td> … … 175 201 <p> 176 202 Used e.g. in generating normal samples. 177 <p>Implemented in <a class="el" href="classfsqmat.html# 6648dd4291b809cce14e8497d0433ad3">fsqmat</a>.</p>203 <p>Implemented in <a class="el" href="classfsqmat.html#2288389e2d47bd9df112815ef570c5c9">fsqmat</a>.</p> 178 204 179 205 </div> … … 181 207 <hr>The documentation for this class was generated from the following file:<ul> 182 208 <li>work/mixpp/bdm/math/<a class="el" href="libDC_8h-source.html">libDC.h</a></ul> 183 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:452008 for mixpp by 209 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:56 2008 for mixpp by 184 210 <a href="http://www.doxygen.org/index.html"> 185 211 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/files.html ¶
r28 r32 14 14 </ul> 15 15 </div> 16 <div class="tabs"> 17 <ul> 18 <li class="current"><a href="files.html"><span>File List</span></a></li> 19 <li><a href="globals.html"><span>File Members</span></a></li> 20 </ul> 21 </div> 16 22 <h1>mixpp File List</h1>Here is a list of all documented files with brief descriptions:<table> 17 23 <tr><td class="indexkey">work/mixpp/bdm/<b>itpp_ext.h</b> <a href="itpp__ext_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr> … … 24 30 <tr><td class="indexkey">work/mixpp/bdm/stat/<b>libFN.h</b> <a href="libFN_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr> 25 31 </table> 26 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:462008 for mixpp by 32 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:59 2008 for mixpp by 27 33 <a href="http://www.doxygen.org/index.html"> 28 34 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/formula.repository ¶
r23 r32 3 3 \form#2:$A=\frac{d}{du}f(x,u)|_{x0,u0}$ 4 4 \form#3:$x \sim epdf(rv)$ 5 \form#4:\[ f(x|a,b) = \prod f(x_i|a_i,b_i) \] -
TabularUnified doc/html/functions.html ¶
r28 r32 39 39 <li><a href="#index_f"><span>f</span></a></li> 40 40 <li><a href="#index_g"><span>g</span></a></li> 41 <li><a href="#index_h"><span>h</span></a></li> 41 42 <li><a href="#index_i"><span>i</span></a></li> 42 43 <li><a href="#index_k"><span>k</span></a></li> 43 44 <li><a href="#index_l"><span>l</span></a></li> 44 45 <li><a href="#index_m"><span>m</span></a></li> 46 <li><a href="#index_n"><span>n</span></a></li> 45 47 <li><a href="#index_o"><span>o</span></a></li> 46 48 <li><a href="#index_p"><span>p</span></a></li> … … 51 53 <li><a href="#index_u"><span>u</span></a></li> 52 54 <li><a href="#index_w"><span>w</span></a></li> 55 <li><a href="#index_~"><span>~</span></a></li> 53 56 </ul> 54 57 </div> … … 58 61 <p> 59 62 <h3><a class="anchor" name="index__">- _ -</a></h3><ul> 63 <li>_cached() 64 : <a class="el" href="classenorm.html#c9ca4f2ca42568e40ca146168e7f3247">enorm< sq_T ></a> 60 65 <li>_dimu() 61 66 : <a class="el" href="classdiffbifn.html#fc8779acbff170611aff0ee70cee3879">diffbifn</a> … … 65 70 : <a class="el" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298">fnc</a> 66 71 <li>_epdf() 67 : <a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">BM</a> 72 : <a class="el" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4">Kalman< sq_T ></a> 73 , <a class="el" href="classMPF.html#549e08268a46a250f21a33d06f19276a">MPF< BM_T ></a> 74 , <a class="el" href="classBM.html#3dc45554556926bde996a267636abe55">BM</a> 75 <li>_iR 76 : <a class="el" href="classenorm.html#82f39ac49911d7097f4bfe385deba355">enorm< sq_T ></a> 77 <li>_mu() 78 : <a class="el" href="classenorm.html#3be0cb541ec9b88e5aa3f60307bbc753">enorm< sq_T ></a> 79 <li>_param() 80 : <a class="el" href="classegamma.html#44445c56e60b91b377f207f8d5089790">egamma</a> 81 <li>_R() 82 : <a class="el" href="classenorm.html#8725c534863c4fc2bddef0edfb95a740">enorm< sq_T ></a> 83 <li>_w() 84 : <a class="el" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b">eEmp</a> 68 85 </ul> 69 86 <h3><a class="anchor" name="index_a">- a -</a></h3><ul> 70 87 <li>add() 71 : <a class="el" href="classRV.html# f068a86abb5a6e46fcf76c939d2ed2ec">RV</a>88 : <a class="el" href="classRV.html#18fa114b92017f7f80301a4f8d3a6382">RV</a> 72 89 </ul> 73 90 <h3><a class="anchor" name="index_b">- b -</a></h3><ul> 74 91 <li>bayes() 75 : <a class="el" href="classKalmanFull.html#048b13739b94c331cda08249b278552b">KalmanFull</a> 76 , <a class="el" href="classKalman.html#e945d9205ca14acbd83ba80ea6f72b8e">Kalman< sq_T ></a> 77 , <a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM</a> 78 , <a class="el" href="classEKF.html#fb0a08463f14e5584344ea2df99fe747">EKF< sq_T ></a> 92 : <a class="el" href="classKalmanFull.html#13a041cd98ff157703766be275a657bb">KalmanFull</a> 93 , <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< sq_T ></a> 94 , <a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">PF</a> 95 , <a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">BM</a> 96 , <a class="el" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623">MPF< BM_T ></a> 97 , <a class="el" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7">EKF< sq_T ></a> 79 98 <li>bilinfn() 80 99 : <a class="el" href="classbilinfn.html#af9f36282730d910a41b95f4d1fb8221">bilinfn</a> 81 100 <li>BM() 82 : <a class="el" href="classBM.html# ef32a12f4f89e4000bf5390ceda762ae">BM</a>101 : <a class="el" href="classBM.html#605d28b426adb677c86a57ddb525132a">BM</a> 83 102 </ul> 84 103 <h3><a class="anchor" name="index_c">- c -</a></h3><ul> 104 <li>cached 105 : <a class="el" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1">enorm< sq_T ></a> 85 106 <li>clear() 86 107 : <a class="el" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e">sqmat</a> … … 88 109 <li>cols() 89 110 : <a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b">sqmat</a> 111 <li>condition() 112 : <a class="el" href="classKFcondQR.html#c9ecf292a85327aa6309c9fd70ceb606">KFcondQR</a> 113 , <a class="el" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d">BMcond</a> 90 114 <li>constfn() 91 115 : <a class="el" href="classconstfn.html#d08acd7fac0ef3edfa59bbe48403f2bc">constfn</a> … … 102 126 <li>diffbifn() 103 127 : <a class="el" href="classdiffbifn.html#0b33e1bfa23be5ed234d172eb4c0e4b5">diffbifn</a> 128 <li>dim 129 : <a class="el" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e">enorm< sq_T ></a> 130 <li>distance 131 : <a class="el" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4">euni</a> 104 132 <li>Drv 105 133 : <a class="el" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">DS</a> 106 <li>dupdate()107 : <a class="el" href="classenorm.html#d1b0faf61260de09cf63bf823add5b32">enorm< sq_T ></a>108 134 </ul> 109 135 <h3><a class="anchor" name="index_e">- e -</a></h3><ul> 136 <li>eEF() 137 : <a class="el" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e">eEF</a> 138 <li>egamma() 139 : <a class="el" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1">egamma</a> 110 140 <li>EKF() 111 : <a class="el" href="classEKF.html#003687c6cf2a01be90a00e2c99e3863e">EKF< sq_T ></a> 141 : <a class="el" href="classEKF.html#ea4f3254cacf0a92d2a820b1201d049e">EKF< sq_T ></a> 142 <li>emix() 143 : <a class="el" href="classemix.html#b0ac204af8919c22bce72816ed82019e">emix</a> 144 <li>ep 145 : <a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">mpdf</a> 146 <li>ePdf 147 : <a class="el" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0">PF</a> 148 <li>epdf() 149 : <a class="el" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">epdf</a> 150 <li>est 151 : <a class="el" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424">Kalman< sq_T ></a> 112 152 <li>eval() 113 : <a class="el" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">fnc</a> 153 : <a class="el" href="classeuni.html#95f29237feb32fcadf570a181d5a0918">euni</a> 154 , <a class="el" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">epdf</a> 114 155 , <a class="el" href="classbilinfn.html#e36a16e72e7f9fedf3cb18d2d5505a24">bilinfn</a> 115 , <a class="el" href="classdiffbifn.html#40d8a7eee45acc55cda33d43282faa03">diffbifn</a> 156 , <a class="el" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">fnc</a> 157 , <a class="el" href="classdiffbifn.html#ad7673e16aa1a046b131b24c731c4632">diffbifn</a> 116 158 , <a class="el" href="classenorm.html#93107f05a8e9b34b64853767200121a4">enorm< sq_T ></a> 117 , <a class="el" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">epdf</a>118 159 <li>evalll 119 160 : <a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">BM</a> 161 <li>evalpdflog() 162 : <a class="el" href="classenorm.html#9517594915e897584eaebbb057ed8881">enorm< sq_T ></a> 163 , <a class="el" href="classeuni.html#830fca2ffb6786530529c57eabc81666">euni</a> 164 , <a class="el" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">epdf</a> 120 165 </ul> 121 166 <h3><a class="anchor" name="index_f">- f -</a></h3><ul> … … 123 168 : <a class="el" href="classRV.html#6b078b1086224aca3a9e5a203e647fb6">RV</a> 124 169 <li>fsqmat() 125 : <a class="el" href="classfsqmat.html#1929fbc9fe375f1d67f979d0d302336f">fsqmat</a> 170 : <a class="el" href="classfsqmat.html#79e3f73e0ccd663c7f7e08083d272940">fsqmat</a> 171 <li>fy 172 : <a class="el" href="classKalman.html#e580ab06483952bd03f2e651763e184f">Kalman< sq_T ></a> 126 173 </ul> 127 174 <h3><a class="anchor" name="index_g">- g -</a></h3><ul> 175 <li>Gamma_RNG() 176 : <a class="el" href="classitpp_1_1Gamma__RNG.html#e132860f825f427d63652edd02c25b54">itpp::Gamma_RNG</a> 177 <li>get_setup() 178 : <a class="el" href="classitpp_1_1Gamma__RNG.html#8e666953249038f262cece2d3ed952d6">itpp::Gamma_RNG</a> 128 179 <li>getdata() 129 : <a class="el" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1">DS</a> 180 : <a class="el" href="classMemDS.html#23522b9e7dd0bb0c365cc9cde4c05449">MemDS</a> 181 , <a class="el" href="classDS.html#4027575bc66ea358f9b03dd3be28fe1e">DS</a> 130 182 , <a class="el" href="classMemDS.html#900f1e1c9eb950f87e557c068628e60e">MemDS</a> 131 , <a class="el" href="classDS.html#4027575bc66ea358f9b03dd3be28fe1e">DS</a> 183 </ul> 184 <h3><a class="anchor" name="index_h">- h -</a></h3><ul> 185 <li>high 186 : <a class="el" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231">euni</a> 132 187 </ul> 133 188 <h3><a class="anchor" name="index_i">- i -</a></h3><ul> … … 139 194 <h3><a class="anchor" name="index_k">- k -</a></h3><ul> 140 195 <li>Kalman() 141 : <a class="el" href="classKalman.html# 96958a5ebfa966d892137987f265083a">Kalman< sq_T ></a>196 : <a class="el" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3">Kalman< sq_T ></a> 142 197 <li>KalmanFull() 143 198 : <a class="el" href="classKalmanFull.html#7197ab6e7380790006394eabd3b97043">KalmanFull</a> 144 199 </ul> 145 200 <h3><a class="anchor" name="index_l">- l -</a></h3><ul> 201 <li>len 202 : <a class="el" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9">RV</a> 146 203 <li>linkrvs() 147 204 : <a class="el" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75">DS</a> … … 150 207 : <a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">BM</a> 151 208 <li>logdet() 152 : <a class="el" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547">sqmat</a> 153 , <a class="el" href="classfsqmat.html#bf212272ec195ad2706e2bf4d8e7c9b3">fsqmat</a> 209 : <a class="el" href="classsqmat.html#0a772b396750eeeed85d69fa72478b45">sqmat</a> 210 , <a class="el" href="classfsqmat.html#eb0d1358f536e4453b5f99d0418ca1e5">fsqmat</a> 211 <li>low 212 : <a class="el" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1">euni</a> 154 213 </ul> 155 214 <h3><a class="anchor" name="index_m">- m -</a></h3><ul> 215 <li>mean() 216 : <a class="el" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef">epdf</a> 217 , <a class="el" href="classenorm.html#191c1220c3ddd0c5f54e78f19b57ebd5">enorm< sq_T ></a> 218 , <a class="el" href="classemix.html#dcb3f927bf061eac6229850158ca1558">emix</a> 219 , <a class="el" href="classeuni.html#34a2f2d23158c40b97b44dfe551a1b3d">euni</a> 220 , <a class="el" href="classegamma.html#6617890ffa40767fc196876534d4119d">egamma</a> 221 , <a class="el" href="classeEmp.html#de42454cb65a17fd8662d207dd59aacf">eEmp</a> 222 <li>mgamma() 223 : <a class="el" href="classmgamma.html#af43e61b86900c0398d5c0ffc83b94e6">mgamma</a> 224 <li>mlnorm() 225 : <a class="el" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5">mlnorm< sq_T ></a> 226 <li>mpdf() 227 : <a class="el" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">mpdf</a> 228 <li>MPF() 229 : <a class="el" href="classMPF.html#827a66609cf69a832535d52233f76fa0">MPF< BM_T ></a> 156 230 <li>mu 157 231 : <a class="el" href="classKalmanFull.html#fb5aec635e2720cc5ac31bc01c18a68a">KalmanFull</a> 158 , <a class="el" href="class Kalman.html#3063a3f58a74cea672ae889971012eed">Kalman< sq_T ></a>232 , <a class="el" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">enorm< sq_T ></a> 159 233 <li>mult_sym() 160 : <a class="el" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157">sqmat</a> 161 , <a class="el" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518">fsqmat</a> 234 : <a class="el" href="classfsqmat.html#5530d2756b5d991de755e6121c9a452e">fsqmat</a> 235 , <a class="el" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa">sqmat</a> 236 <li>mult_sym_t() 237 : <a class="el" href="classfsqmat.html#92052a8adc2054b63e42d1373d145c89">fsqmat</a> 238 , <a class="el" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325">sqmat</a> 239 </ul> 240 <h3><a class="anchor" name="index_n">- n -</a></h3><ul> 241 <li>n 242 : <a class="el" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280">PF</a> 243 , <a class="el" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd">eEmp</a> 244 <li>nk 245 : <a class="el" href="classeuni.html#63105490e946e43372d6187ad1bafdda">euni</a> 162 246 </ul> 163 247 <h3><a class="anchor" name="index_o">- o -</a></h3><ul> 248 <li>obs 249 : <a class="el" href="classPF.html#dd0a687a4515333d6809147335854e77">PF</a> 164 250 <li>operator()() 165 : <a class="el" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45">RV</a> 251 : <a class="el" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e">itpp::Gamma_RNG</a> 252 , <a class="el" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45">RV</a> 253 , <a class="el" href="classitpp_1_1Gamma__RNG.html#d407bbcda8a39e3f07cac3fdf58ca430">itpp::Gamma_RNG</a> 166 254 <li>operator<< 167 255 : <a class="el" href="classRV.html#cad6f15535d10437f6690cb4492176a8">RV</a> … … 173 261 <li>P 174 262 : <a class="el" href="classKalmanFull.html#b75dc059e84fa8ffc076203b30f926cc">KalmanFull</a> 175 , <a class="el" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3">Kalman< sq_T ></a> 263 <li>par 264 : <a class="el" href="classPF.html#d92ac103f88f8c21e197e90af5695a09">PF</a> 176 265 </ul> 177 266 <h3><a class="anchor" name="index_q">- q -</a></h3><ul> 178 267 <li>qform() 179 : <a class="el" href="classsqmat.html# 44e079468bc8bfccf634dc85b32ba6be">sqmat</a>180 , <a class="el" href="classfsqmat.html# 6d047b9f7a27dfc093303a13cc9b1fba">fsqmat</a>268 : <a class="el" href="classsqmat.html#90f97cdf9de08ead4f0648419b3aa4ce">sqmat</a> 269 , <a class="el" href="classfsqmat.html#1eec8762a2299d83c7b7cd6bf6cbc1ad">fsqmat</a> 181 270 </ul> 182 271 <h3><a class="anchor" name="index_r">- r -</a></h3><ul> 272 <li>R 273 : <a class="el" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">enorm< sq_T ></a> 183 274 <li>resample() 184 : <a class="el" href="class PF.html#a0e26b2f6a5884aca49122f3e4f0cf19">PF</a>275 : <a class="el" href="classeEmp.html#77268292fc4465cb73ddbfb1f2932a59">eEmp</a> 185 276 <li>rows() 186 277 : <a class="el" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646">sqmat</a> 187 278 <li>RV() 188 279 : <a class="el" href="classRV.html#cf911c3900214460ade1366b04058462">RV</a> 280 <li>rv 281 : <a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">mpdf</a> 282 , <a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">BM</a> 283 <li>RV() 284 : <a class="el" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e">RV</a> 285 <li>rvc 286 : <a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">mpdf</a> 189 287 </ul> 190 288 <h3><a class="anchor" name="index_s">- s -</a></h3><ul> … … 192 290 : <a class="el" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa">epdf</a> 193 291 , <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< sq_T ></a> 292 , <a class="el" href="classemix.html#3eb9a8e12ce1c5c8a3ddb245354b6941">emix</a> 293 , <a class="el" href="classeuni.html#0f71562e3e919aba823cb7d9d420ad4c">euni</a> 294 , <a class="el" href="classegamma.html#0a2186a586432c2c3f22d09c5341890f">egamma</a> 295 , <a class="el" href="classeEmp.html#c9b44099a400579b88aff9f5afaf9c13">eEmp</a> 194 296 <li>samplecond() 195 : <a class="el" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">mpdf</a> 297 : <a class="el" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18">mlnorm< sq_T ></a> 298 , <a class="el" href="classmgamma.html#9f40dc43885085fad8e3d6652b79e139">mgamma</a> 299 , <a class="el" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">mpdf</a> 300 <li>samples 301 : <a class="el" href="classPF.html#361743a0b5b89de1a29e91d1343b2565">PF</a> 302 <li>set_est() 303 : <a class="el" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0">Kalman< sq_T ></a> 304 <li>set_parameters() 305 : <a class="el" href="classegamma.html#8e348b89be82b70471fe8c5630f61339">egamma</a> 306 , <a class="el" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a">Kalman< sq_T ></a> 307 <li>setup() 308 : <a class="el" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe">itpp::Gamma_RNG</a> 309 <li>size 310 : <a class="el" href="classRV.html#0cae53d262be90a775a99a198e17fa58">RV</a> 196 311 <li>sqrt_mult() 197 : <a class="el" href="classsqmat.html# b5236c8a050199e1a9d338b0da1a08d2">sqmat</a>198 , <a class="el" href="classfsqmat.html# 6648dd4291b809cce14e8497d0433ad3">fsqmat</a>312 : <a class="el" href="classsqmat.html#975ddc7e8035d8d4e6cbd52dd99c248c">sqmat</a> 313 , <a class="el" href="classfsqmat.html#2288389e2d47bd9df112815ef570c5c9">fsqmat</a> 199 314 <li>step() 200 : <a class="el" href="class MemDS.html#21916feb3e5ff960855c09b06a0d279b">MemDS</a>201 , <a class="el" href="class DS.html#470ba89e8e7c3c4d830803221b4e9be6">DS</a>315 : <a class="el" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6">DS</a> 316 , <a class="el" href="classMemDS.html#21916feb3e5ff960855c09b06a0d279b">MemDS</a> 202 317 <li>subselect() 203 318 : <a class="el" href="classRV.html#2bf35b18a32aad419f0516273939628e">RV</a> … … 219 334 </ul> 220 335 <h3><a class="anchor" name="index_w">- w -</a></h3><ul> 336 <li>w 337 : <a class="el" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0">PF</a> 221 338 <li>write() 222 : <a class="el" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039">DS</a> 223 , <a class="el" href="classMemDS.html#6279bf18d44343750747ecc12e050f09">MemDS</a> 339 : <a class="el" href="classMemDS.html#6279bf18d44343750747ecc12e050f09">MemDS</a> 224 340 , <a class="el" href="classDS.html#f4ae51a3bc1267a6a52fc229973afe85">DS</a> 225 341 </ul> 226 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 342 <h3><a class="anchor" name="index_~">- ~ -</a></h3><ul> 343 <li>~BM() 344 : <a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">BM</a> 345 <li>~epdf() 346 : <a class="el" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">epdf</a> 347 <li>~fnc() 348 : <a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">fnc</a> 349 <li>~fsqmat() 350 : <a class="el" href="classfsqmat.html#2a8f104e4befbc2aa90d8b11edfedb2e">fsqmat</a> 351 <li>~mpdf() 352 : <a class="el" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">mpdf</a> 353 <li>~sqmat() 354 : <a class="el" href="classsqmat.html#0481f2067bb32aaea7e6d4f27e46b656">sqmat</a> 355 </ul> 356 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:41 2008 for mixpp by 227 357 <a href="http://www.doxygen.org/index.html"> 228 358 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/functions_func.html ¶
r28 r32 49 49 <li><a href="#index_t"><span>t</span></a></li> 50 50 <li><a href="#index_w"><span>w</span></a></li> 51 <li><a href="#index_~"><span>~</span></a></li> 51 52 </ul> 52 53 </div> … … 56 57 <p> 57 58 <h3><a class="anchor" name="index__">- _ -</a></h3><ul> 59 <li>_cached() 60 : <a class="el" href="classenorm.html#c9ca4f2ca42568e40ca146168e7f3247">enorm< sq_T ></a> 58 61 <li>_dimu() 59 62 : <a class="el" href="classdiffbifn.html#fc8779acbff170611aff0ee70cee3879">diffbifn</a> … … 63 66 : <a class="el" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298">fnc</a> 64 67 <li>_epdf() 65 : <a class="el" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077">BM</a> 68 : <a class="el" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4">Kalman< sq_T ></a> 69 , <a class="el" href="classBM.html#3dc45554556926bde996a267636abe55">BM</a> 70 , <a class="el" href="classMPF.html#549e08268a46a250f21a33d06f19276a">MPF< BM_T ></a> 71 <li>_mu() 72 : <a class="el" href="classenorm.html#3be0cb541ec9b88e5aa3f60307bbc753">enorm< sq_T ></a> 73 <li>_param() 74 : <a class="el" href="classegamma.html#44445c56e60b91b377f207f8d5089790">egamma</a> 75 <li>_R() 76 : <a class="el" href="classenorm.html#8725c534863c4fc2bddef0edfb95a740">enorm< sq_T ></a> 77 <li>_w() 78 : <a class="el" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b">eEmp</a> 66 79 </ul> 67 80 <h3><a class="anchor" name="index_a">- a -</a></h3><ul> 68 81 <li>add() 69 : <a class="el" href="classRV.html# f068a86abb5a6e46fcf76c939d2ed2ec">RV</a>82 : <a class="el" href="classRV.html#18fa114b92017f7f80301a4f8d3a6382">RV</a> 70 83 </ul> 71 84 <h3><a class="anchor" name="index_b">- b -</a></h3><ul> 72 85 <li>bayes() 73 : <a class="el" href="classKalmanFull.html#048b13739b94c331cda08249b278552b">KalmanFull</a> 74 , <a class="el" href="classKalman.html#e945d9205ca14acbd83ba80ea6f72b8e">Kalman< sq_T ></a> 75 , <a class="el" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf">BM</a> 76 , <a class="el" href="classEKF.html#fb0a08463f14e5584344ea2df99fe747">EKF< sq_T ></a> 86 : <a class="el" href="classKalmanFull.html#13a041cd98ff157703766be275a657bb">KalmanFull</a> 87 , <a class="el" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">Kalman< sq_T ></a> 88 , <a class="el" href="classPF.html#64f636bbd63bea9efd778214e6b631d3">PF</a> 89 , <a class="el" href="classBM.html#87b07867fd4c133aa89a18543f68d9f9">BM</a> 90 , <a class="el" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623">MPF< BM_T ></a> 91 , <a class="el" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7">EKF< sq_T ></a> 77 92 <li>bilinfn() 78 93 : <a class="el" href="classbilinfn.html#af9f36282730d910a41b95f4d1fb8221">bilinfn</a> 79 94 <li>BM() 80 : <a class="el" href="classBM.html# ef32a12f4f89e4000bf5390ceda762ae">BM</a>95 : <a class="el" href="classBM.html#605d28b426adb677c86a57ddb525132a">BM</a> 81 96 </ul> 82 97 <h3><a class="anchor" name="index_c">- c -</a></h3><ul> … … 86 101 <li>cols() 87 102 : <a class="el" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b">sqmat</a> 103 <li>condition() 104 : <a class="el" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d">BMcond</a> 105 , <a class="el" href="classKFcondQR.html#c9ecf292a85327aa6309c9fd70ceb606">KFcondQR</a> 88 106 <li>constfn() 89 107 : <a class="el" href="classconstfn.html#d08acd7fac0ef3edfa59bbe48403f2bc">constfn</a> … … 100 118 <li>diffbifn() 101 119 : <a class="el" href="classdiffbifn.html#0b33e1bfa23be5ed234d172eb4c0e4b5">diffbifn</a> 102 <li>dupdate()103 : <a class="el" href="classenorm.html#d1b0faf61260de09cf63bf823add5b32">enorm< sq_T ></a>104 120 </ul> 105 121 <h3><a class="anchor" name="index_e">- e -</a></h3><ul> 122 <li>eEF() 123 : <a class="el" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e">eEF</a> 124 <li>egamma() 125 : <a class="el" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1">egamma</a> 106 126 <li>EKF() 107 : <a class="el" href="classEKF.html#003687c6cf2a01be90a00e2c99e3863e">EKF< sq_T ></a> 127 : <a class="el" href="classEKF.html#ea4f3254cacf0a92d2a820b1201d049e">EKF< sq_T ></a> 128 <li>emix() 129 : <a class="el" href="classemix.html#b0ac204af8919c22bce72816ed82019e">emix</a> 130 <li>epdf() 131 : <a class="el" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">epdf</a> 108 132 <li>eval() 109 : <a class="el" href="classbilinfn.html#e36a16e72e7f9fedf3cb18d2d5505a24">bilinfn</a> 133 : <a class="el" href="classdiffbifn.html#ad7673e16aa1a046b131b24c731c4632">diffbifn</a> 134 , <a class="el" href="classbilinfn.html#e36a16e72e7f9fedf3cb18d2d5505a24">bilinfn</a> 135 , <a class="el" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">epdf</a> 136 , <a class="el" href="classenorm.html#93107f05a8e9b34b64853767200121a4">enorm< sq_T ></a> 137 , <a class="el" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">fnc</a> 138 , <a class="el" href="classeuni.html#95f29237feb32fcadf570a181d5a0918">euni</a> 110 139 , <a class="el" href="classdiffbifn.html#40d8a7eee45acc55cda33d43282faa03">diffbifn</a> 111 , <a class="el" href="classenorm.html#93107f05a8e9b34b64853767200121a4">enorm< sq_T ></a> 112 , <a class="el" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">epdf</a> 113 , <a class="el" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">fnc</a> 140 <li>evalpdflog() 141 : <a class="el" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">epdf</a> 142 , <a class="el" href="classeuni.html#830fca2ffb6786530529c57eabc81666">euni</a> 143 , <a class="el" href="classenorm.html#9517594915e897584eaebbb057ed8881">enorm< sq_T ></a> 114 144 </ul> 115 145 <h3><a class="anchor" name="index_f">- f -</a></h3><ul> … … 120 150 </ul> 121 151 <h3><a class="anchor" name="index_g">- g -</a></h3><ul> 152 <li>Gamma_RNG() 153 : <a class="el" href="classitpp_1_1Gamma__RNG.html#e132860f825f427d63652edd02c25b54">itpp::Gamma_RNG</a> 154 <li>get_setup() 155 : <a class="el" href="classitpp_1_1Gamma__RNG.html#8e666953249038f262cece2d3ed952d6">itpp::Gamma_RNG</a> 122 156 <li>getdata() 123 : <a class="el" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1">DS</a> 157 : <a class="el" href="classMemDS.html#23522b9e7dd0bb0c365cc9cde4c05449">MemDS</a> 158 , <a class="el" href="classDS.html#4027575bc66ea358f9b03dd3be28fe1e">DS</a> 124 159 , <a class="el" href="classMemDS.html#900f1e1c9eb950f87e557c068628e60e">MemDS</a> 125 , <a class="el" href="classDS.html#4027575bc66ea358f9b03dd3be28fe1e">DS</a>126 160 </ul> 127 161 <h3><a class="anchor" name="index_i">- i -</a></h3><ul> … … 133 167 <h3><a class="anchor" name="index_k">- k -</a></h3><ul> 134 168 <li>Kalman() 135 : <a class="el" href="classKalman.html# 96958a5ebfa966d892137987f265083a">Kalman< sq_T ></a>169 : <a class="el" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3">Kalman< sq_T ></a> 136 170 <li>KalmanFull() 137 171 : <a class="el" href="classKalmanFull.html#7197ab6e7380790006394eabd3b97043">KalmanFull</a> … … 142 176 , <a class="el" href="classMemDS.html#5f72b555e0e4a61de1440c457cf57007">MemDS</a> 143 177 <li>logdet() 144 : <a class="el" href="classsqmat.html# 5c852819589f74cdaefbd648c0ce8547">sqmat</a>145 , <a class="el" href="classfsqmat.html# bf212272ec195ad2706e2bf4d8e7c9b3">fsqmat</a>178 : <a class="el" href="classsqmat.html#0a772b396750eeeed85d69fa72478b45">sqmat</a> 179 , <a class="el" href="classfsqmat.html#eb0d1358f536e4453b5f99d0418ca1e5">fsqmat</a> 146 180 </ul> 147 181 <h3><a class="anchor" name="index_m">- m -</a></h3><ul> 182 <li>mean() 183 : <a class="el" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef">epdf</a> 184 , <a class="el" href="classenorm.html#191c1220c3ddd0c5f54e78f19b57ebd5">enorm< sq_T ></a> 185 , <a class="el" href="classemix.html#dcb3f927bf061eac6229850158ca1558">emix</a> 186 , <a class="el" href="classeuni.html#34a2f2d23158c40b97b44dfe551a1b3d">euni</a> 187 , <a class="el" href="classegamma.html#6617890ffa40767fc196876534d4119d">egamma</a> 188 , <a class="el" href="classeEmp.html#de42454cb65a17fd8662d207dd59aacf">eEmp</a> 189 <li>mgamma() 190 : <a class="el" href="classmgamma.html#af43e61b86900c0398d5c0ffc83b94e6">mgamma</a> 191 <li>mlnorm() 192 : <a class="el" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5">mlnorm< sq_T ></a> 193 <li>mpdf() 194 : <a class="el" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">mpdf</a> 195 <li>MPF() 196 : <a class="el" href="classMPF.html#827a66609cf69a832535d52233f76fa0">MPF< BM_T ></a> 148 197 <li>mult_sym() 149 : <a class="el" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157">sqmat</a> 150 , <a class="el" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518">fsqmat</a> 198 : <a class="el" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa">sqmat</a> 199 , <a class="el" href="classfsqmat.html#5530d2756b5d991de755e6121c9a452e">fsqmat</a> 200 <li>mult_sym_t() 201 : <a class="el" href="classfsqmat.html#92052a8adc2054b63e42d1373d145c89">fsqmat</a> 202 , <a class="el" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325">sqmat</a> 151 203 </ul> 152 204 <h3><a class="anchor" name="index_o">- o -</a></h3><ul> 153 205 <li>operator()() 154 : <a class="el" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45">RV</a> 206 : <a class="el" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e">itpp::Gamma_RNG</a> 207 , <a class="el" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45">RV</a> 208 , <a class="el" href="classitpp_1_1Gamma__RNG.html#7b82b9d6c35579ab04f1a86a17571b47">itpp::Gamma_RNG</a> 155 209 <li>opupdt() 156 210 : <a class="el" href="classfsqmat.html#b36530e155667fe9f1bd58394e50c65a">fsqmat</a> … … 159 213 <h3><a class="anchor" name="index_q">- q -</a></h3><ul> 160 214 <li>qform() 161 : <a class="el" href="classsqmat.html# 44e079468bc8bfccf634dc85b32ba6be">sqmat</a>162 , <a class="el" href="classfsqmat.html# 6d047b9f7a27dfc093303a13cc9b1fba">fsqmat</a>215 : <a class="el" href="classsqmat.html#90f97cdf9de08ead4f0648419b3aa4ce">sqmat</a> 216 , <a class="el" href="classfsqmat.html#1eec8762a2299d83c7b7cd6bf6cbc1ad">fsqmat</a> 163 217 </ul> 164 218 <h3><a class="anchor" name="index_r">- r -</a></h3><ul> 165 219 <li>resample() 166 : <a class="el" href="class PF.html#a0e26b2f6a5884aca49122f3e4f0cf19">PF</a>220 : <a class="el" href="classeEmp.html#77268292fc4465cb73ddbfb1f2932a59">eEmp</a> 167 221 <li>rows() 168 222 : <a class="el" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646">sqmat</a> … … 174 228 : <a class="el" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa">epdf</a> 175 229 , <a class="el" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">enorm< sq_T ></a> 230 , <a class="el" href="classemix.html#3eb9a8e12ce1c5c8a3ddb245354b6941">emix</a> 231 , <a class="el" href="classeuni.html#0f71562e3e919aba823cb7d9d420ad4c">euni</a> 232 , <a class="el" href="classegamma.html#0a2186a586432c2c3f22d09c5341890f">egamma</a> 233 , <a class="el" href="classeEmp.html#c9b44099a400579b88aff9f5afaf9c13">eEmp</a> 176 234 <li>samplecond() 177 : <a class="el" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">mpdf</a> 235 : <a class="el" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18">mlnorm< sq_T ></a> 236 , <a class="el" href="classmgamma.html#9f40dc43885085fad8e3d6652b79e139">mgamma</a> 237 , <a class="el" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">mpdf</a> 238 <li>set_est() 239 : <a class="el" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0">Kalman< sq_T ></a> 240 <li>set_parameters() 241 : <a class="el" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a">Kalman< sq_T ></a> 242 , <a class="el" href="classegamma.html#8e348b89be82b70471fe8c5630f61339">egamma</a> 243 <li>setup() 244 : <a class="el" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe">itpp::Gamma_RNG</a> 178 245 <li>sqrt_mult() 179 : <a class="el" href="classsqmat.html# b5236c8a050199e1a9d338b0da1a08d2">sqmat</a>180 , <a class="el" href="classfsqmat.html# 6648dd4291b809cce14e8497d0433ad3">fsqmat</a>246 : <a class="el" href="classsqmat.html#975ddc7e8035d8d4e6cbd52dd99c248c">sqmat</a> 247 , <a class="el" href="classfsqmat.html#2288389e2d47bd9df112815ef570c5c9">fsqmat</a> 181 248 <li>step() 182 249 : <a class="el" href="classMemDS.html#21916feb3e5ff960855c09b06a0d279b">MemDS</a> … … 202 269 , <a class="el" href="classDS.html#f4ae51a3bc1267a6a52fc229973afe85">DS</a> 203 270 </ul> 204 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 271 <h3><a class="anchor" name="index_~">- ~ -</a></h3><ul> 272 <li>~BM() 273 : <a class="el" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">BM</a> 274 <li>~epdf() 275 : <a class="el" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">epdf</a> 276 <li>~fnc() 277 : <a class="el" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">fnc</a> 278 <li>~fsqmat() 279 : <a class="el" href="classfsqmat.html#2a8f104e4befbc2aa90d8b11edfedb2e">fsqmat</a> 280 <li>~mpdf() 281 : <a class="el" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">mpdf</a> 282 <li>~sqmat() 283 : <a class="el" href="classsqmat.html#0481f2067bb32aaea7e6d4f27e46b656">sqmat</a> 284 </ul> 285 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:41 2008 for mixpp by 205 286 <a href="http://www.doxygen.org/index.html"> 206 287 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/functions_rela.html ¶
r28 r32 35 35 : <a class="el" href="classRV.html#cad6f15535d10437f6690cb4492176a8">RV</a> 36 36 </ul> 37 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:402008 for mixpp by 37 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:41 2008 for mixpp by 38 38 <a href="http://www.doxygen.org/index.html"> 39 39 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/functions_vars.html ¶
r28 r32 32 32 <p> 33 33 <ul> 34 <li>_iR 35 : <a class="el" href="classenorm.html#82f39ac49911d7097f4bfe385deba355">enorm< sq_T ></a> 36 <li>cached 37 : <a class="el" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1">enorm< sq_T ></a> 38 <li>dim 39 : <a class="el" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e">enorm< sq_T ></a> 40 <li>distance 41 : <a class="el" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4">euni</a> 34 42 <li>Drv 35 43 : <a class="el" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">DS</a> 44 <li>ep 45 : <a class="el" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">mpdf</a> 46 <li>ePdf 47 : <a class="el" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0">PF</a> 48 <li>est 49 : <a class="el" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424">Kalman< sq_T ></a> 36 50 <li>evalll 37 51 : <a class="el" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">BM</a> 52 <li>fy 53 : <a class="el" href="classKalman.html#e580ab06483952bd03f2e651763e184f">Kalman< sq_T ></a> 54 <li>high 55 : <a class="el" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231">euni</a> 56 <li>len 57 : <a class="el" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9">RV</a> 38 58 <li>ll 39 59 : <a class="el" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">BM</a> 60 <li>low 61 : <a class="el" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1">euni</a> 40 62 <li>mu 41 63 : <a class="el" href="classKalmanFull.html#fb5aec635e2720cc5ac31bc01c18a68a">KalmanFull</a> 42 , <a class="el" href="classKalman.html#3063a3f58a74cea672ae889971012eed">Kalman< sq_T ></a> 64 , <a class="el" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">enorm< sq_T ></a> 65 <li>n 66 : <a class="el" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280">PF</a> 67 , <a class="el" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd">eEmp</a> 68 <li>nk 69 : <a class="el" href="classeuni.html#63105490e946e43372d6187ad1bafdda">euni</a> 70 <li>obs 71 : <a class="el" href="classPF.html#dd0a687a4515333d6809147335854e77">PF</a> 43 72 <li>P 44 73 : <a class="el" href="classKalmanFull.html#b75dc059e84fa8ffc076203b30f926cc">KalmanFull</a> 45 , <a class="el" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3">Kalman< sq_T ></a> 74 <li>par 75 : <a class="el" href="classPF.html#d92ac103f88f8c21e197e90af5695a09">PF</a> 76 <li>R 77 : <a class="el" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">enorm< sq_T ></a> 78 <li>rv 79 : <a class="el" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">mpdf</a> 80 , <a class="el" href="classBM.html#af00f0612fabe66241dd507188cdbf88">BM</a> 81 <li>rvc 82 : <a class="el" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">mpdf</a> 83 <li>samples 84 : <a class="el" href="classPF.html#361743a0b5b89de1a29e91d1343b2565">PF</a> 85 <li>size 86 : <a class="el" href="classRV.html#0cae53d262be90a775a99a198e17fa58">RV</a> 46 87 <li>Urv 47 88 : <a class="el" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">DS</a> 89 <li>w 90 : <a class="el" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0">PF</a> 48 91 </ul> 49 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:402008 for mixpp by 92 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:41 2008 for mixpp by 50 93 <a href="http://www.doxygen.org/index.html"> 51 94 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/graph_legend.html ¶
r28 r32 76 76 A yellow dashed arrow denotes a relation between a template instance and the template class it was instantiated from. The arrow is labeled with the template parameters of the instance. </li> 77 77 </ul> 78 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:462008 for mixpp by 78 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:59 2008 for mixpp by 79 79 <a href="http://www.doxygen.org/index.html"> 80 80 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/hierarchy.html ¶
r28 r32 27 27 <ul> 28 28 <li><a class="el" href="classKalman.html">Kalman< sq_T ></a> 29 <li><a class="el" href="classKalman.html">Kalman< fsqmat ></a>29 <li><a class="el" href="classKalman.html">Kalman< ldmat ></a> 30 30 <ul> 31 31 <li><a class="el" href="classEKF.html">EKF< sq_T ></a> 32 <li><a class="el" href="classKFcondQR.html">KFcondQR</a> 32 33 </ul> 33 <li><a class="el" href="classKalmanFull.html">KalmanFull</a>34 34 <li><a class="el" href="classPF.html">PF</a> 35 35 <ul> 36 <li><a class="el" href="class TrivialPF.html">TrivialPF</a>36 <li><a class="el" href="classMPF.html">MPF< BM_T ></a> 37 37 </ul> 38 </ul> 39 <li><a class="el" href="classBMcond.html">BMcond</a> 40 <ul> 41 <li><a class="el" href="classKFcondQR.html">KFcondQR</a> 38 42 </ul> 39 43 <li><a class="el" href="classDS.html">DS</a> … … 45 49 <li><a class="el" href="classeEF.html">eEF</a> 46 50 <ul> 51 <li><a class="el" href="classegamma.html">egamma</a> 47 52 <li><a class="el" href="classenorm.html">enorm< sq_T ></a> 53 <li><a class="el" href="classenorm.html">enorm< ldmat ></a> 48 54 </ul> 55 <li><a class="el" href="classeEmp.html">eEmp</a> 56 <li><a class="el" href="classemix.html">emix</a> 57 <li><a class="el" href="classeuni.html">euni</a> 49 58 </ul> 50 59 <li><a class="el" href="classfnc.html">fnc</a> … … 57 66 <li><a class="el" href="classlinfn.html">linfn</a> 58 67 </ul> 68 <li><a class="el" href="classitpp_1_1Gamma__RNG.html">itpp::Gamma_RNG</a> 69 <li><a class="el" href="classKalmanFull.html">KalmanFull</a> 70 <li><a class="el" href="classmgamma.html">mgamma</a> 71 <li><a class="el" href="classmlnorm.html">mlnorm< sq_T ></a> 59 72 <li><a class="el" href="classmpdf.html">mpdf</a> 60 73 <li><a class="el" href="classRV.html">RV</a> … … 64 77 </ul> 65 78 </ul> 66 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 79 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 67 80 <a href="http://www.doxygen.org/index.html"> 68 81 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/index.html ¶
r28 r32 16 16 <h1>mixpp Documentation</h1> 17 17 <p> 18 <h3 align="center">1 </h3><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by 18 <h3 align="center">1 </h3><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:39 2008 for mixpp by 19 19 <a href="http://www.doxygen.org/index.html"> 20 20 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/inherit__graph__0.map ¶
r23 r32 1 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,81,48,108"> 2 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="105,5,233,32"> 3 <area shape="rect" href="$classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="96,56,243,83"> 4 <area shape="rect" href="$classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted..." alt="" coords="124,107,215,133"> 5 <area shape="rect" href="$classPF.html" title="A Particle Filter prototype." alt="" coords="151,157,188,184"> 6 <area shape="rect" href="$classEKF.html" title="Extended Kalman Filter." alt="" coords="292,56,396,83"> 7 <area shape="rect" href="$classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data..." alt="" coords="308,157,380,184"> 1 <area shape="rect" href="$classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,56,48,83"> 2 <area shape="rect" href="$classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="101,5,229,32"> 3 <area shape="rect" href="$classKalman.html" title="Kalman\< ldmat \>" alt="" coords="97,56,233,83"> 4 <area shape="rect" href="$classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model..." alt="" coords="147,157,184,184"> 5 <area shape="rect" href="$classEKF.html" title="Extended Kalman Filter." alt="" coords="288,56,392,83"> 6 <area shape="rect" href="$classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="296,107,384,133"> 7 <area shape="rect" href="$classMPF.html" title="Marginalized Particle filter." alt="" coords="283,157,397,184"> 8 <area shape="rect" href="$classBMcond.html" title="Conditional Bayesian Filter." alt="" coords="129,107,201,133"> -
TabularUnified doc/html/inherit__graph__0.md5 ¶
r23 r32 1 6ddb55acb9fa25b72a34fb8e417f1176 1 5a16a59059a7d5250d3ace922172c9c3 -
TabularUnified doc/html/inherit__graph__2.map ¶
r23 r32 1 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="5,5,56,32"> 2 <area shape="rect" href="$classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="105,5,151,32"> 3 <area shape="rect" href="$classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="201,5,321,32"> 1 <area shape="rect" href="$classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="5,132,56,159"> 2 <area shape="rect" href="$classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="112,56,157,83"> 3 <area shape="rect" href="$classeEmp.html" title="Weighted empirical density." alt="" coords="105,107,164,133"> 4 <area shape="rect" href="$classemix.html" title="Weighted mixture of epdfs with external owned components." alt="" coords="108,157,161,184"> 5 <area shape="rect" href="$classeuni.html" title="Uniform distributed density on a rectangular support." alt="" coords="111,208,159,235"> 6 <area shape="rect" href="$classegamma.html" title="Gamma posterior density." alt="" coords="239,5,319,32"> 7 <area shape="rect" href="$classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="219,56,339,83"> 8 <area shape="rect" href="$classenorm.html" title="enorm\< ldmat \>" alt="" coords="213,107,344,133"> -
TabularUnified doc/html/inherit__graph__2.md5 ¶
r23 r32 1 304615ef75d0480a4f0ff9a58219682d 1 8d99e703fbd55fffd522f941456a35c3 -
TabularUnified doc/html/inherit__graph__4.map ¶
r23 r32 1 <area shape="rect" href="$class mpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="5,5,61,32">1 <area shape="rect" href="$classitpp_1_1Gamma__RNG.html" title="Gamma distribution." alt="" coords="5,5,149,32"> -
TabularUnified doc/html/inherit__graph__4.md5 ¶
r23 r32 1 a3da0188ada230bb8cd4195d4472d1f8 1 0a2d27a86fd18936a73bdff2f5d54587 -
TabularUnified doc/html/inherit__graph__5.map ¶
r23 r32 1 <area shape="rect" href="$class RV.html" title="Class representing variables, most often random variables." alt="" coords="7,5,44,32">1 <area shape="rect" href="$classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted..." alt="" coords="5,5,96,32"> -
TabularUnified doc/html/inherit__graph__5.md5 ¶
r23 r32 1 4ec67ed9bfbeec9d7c9512621ecf6798 1 7b75c696d6f003b2cd117eba359cd671 -
TabularUnified doc/html/inherit__graph__6.map ¶
r23 r32 1 <area shape="rect" href="$classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form..." alt="" coords="7,5,68,32"> 2 <area shape="rect" href="$classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix." alt="" coords="119,5,185,32"> 1 <area shape="rect" href="$classmgamma.html" title="Gamma random walk." alt="" coords="5,5,91,32"> -
TabularUnified doc/html/inherit__graph__6.md5 ¶
r23 r32 1 554ffcb41cff5d0ed282be0df9ae4801 1 0fa673075ae47447cfbc35d3b13cd688 -
TabularUnified doc/html/inherit__graph__7.map ¶
r23 r32 1 <area shape="rect" href="$classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form..." alt="" coords="7,5,68,32"> 2 <area shape="rect" href="$classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix." alt="" coords="119,5,185,32"> 1 <area shape="rect" href="$classmlnorm.html" title="Normal distributed linear function with linear function of mean value;." alt="" coords="7,5,135,32"> -
TabularUnified doc/html/inherit__graph__7.md5 ¶
r23 r32 1 6 2e586a60ab5d6ec2e62c8d35cc907c51 6a326c49441ed1311f9b7f95165a796d -
TabularUnified doc/html/inherits.html ¶
r28 r32 24 24 <p> 25 25 <table border="0" cellspacing="10" cellpadding="0"> 26 <tr><td><img src="inherit__graph__0.png" border="0" alt="" usemap="#BM _map">27 <map name="BM _map">28 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5, 81,48,108"><area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="105,5,233,32"><area shape="rect" href="classKalman.html" title="Kalman\< fsqmat \>" alt="" coords="96,56,243,83"><area shape="rect" href="classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted..." alt="" coords="124,107,215,133"><area shape="rect" href="classPF.html" title="A Particle Filter prototype." alt="" coords="151,157,188,184"><area shape="rect" href="classEKF.html" title="Extended Kalman Filter." alt="" coords="292,56,396,83"><area shape="rect" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data..." alt="" coords="308,157,380,184"></map></td></tr>26 <tr><td><img src="inherit__graph__0.png" border="0" alt="" usemap="#BMcond_map"> 27 <map name="BMcond_map"> 28 <area shape="rect" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities." alt="" coords="5,56,48,83"><area shape="rect" href="classKalman.html" title="Kalman filter with covariance matrices in square root form." alt="" coords="101,5,229,32"><area shape="rect" href="classKalman.html" title="Kalman\< ldmat \>" alt="" coords="97,56,233,83"><area shape="rect" href="classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model..." alt="" coords="147,157,184,184"><area shape="rect" href="classEKF.html" title="Extended Kalman Filter." alt="" coords="288,56,392,83"><area shape="rect" href="classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q." alt="" coords="296,107,384,133"><area shape="rect" href="classMPF.html" title="Marginalized Particle filter." alt="" coords="283,157,397,184"><area shape="rect" href="classBMcond.html" title="Conditional Bayesian Filter." alt="" coords="129,107,201,133"></map></td></tr> 29 29 <tr><td><img src="inherit__graph__1.png" border="0" alt="" usemap="#DS_map"> 30 30 <map name="DS_map"> … … 32 32 <tr><td><img src="inherit__graph__2.png" border="0" alt="" usemap="#epdf_map"> 33 33 <map name="epdf_map"> 34 <area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="5, 5,56,32"><area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="105,5,151,32"><area shape="rect" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="201,5,321,32"></map></td></tr>34 <area shape="rect" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density." alt="" coords="5,132,56,159"><area shape="rect" href="classeEF.html" title="General conjugate exponential family posterior density." alt="" coords="112,56,157,83"><area shape="rect" href="classeEmp.html" title="Weighted empirical density." alt="" coords="105,107,164,133"><area shape="rect" href="classemix.html" title="Weighted mixture of epdfs with external owned components." alt="" coords="108,157,161,184"><area shape="rect" href="classeuni.html" title="Uniform distributed density on a rectangular support." alt="" coords="111,208,159,235"><area shape="rect" href="classegamma.html" title="Gamma posterior density." alt="" coords="239,5,319,32"><area shape="rect" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix." alt="" coords="219,56,339,83"><area shape="rect" href="classenorm.html" title="enorm\< ldmat \>" alt="" coords="213,107,344,133"></map></td></tr> 35 35 <tr><td><img src="inherit__graph__3.png" border="0" alt="" usemap="#fnc_map"> 36 36 <map name="fnc_map"> 37 37 <area shape="rect" href="classfnc.html" title="Class representing function $f(x)$ of variable $x$ represented by rv." alt="" coords="7,56,47,83"><area shape="rect" href="classconstfn.html" title="class representing function $f(x) = a$, here rv is empty" alt="" coords="96,5,165,32"><area shape="rect" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$." alt="" coords="97,56,164,83"><area shape="rect" href="classlinfn.html" title="Class representing function $f(x) = Ax+B$." alt="" coords="107,107,155,133"><area shape="rect" href="classbilinfn.html" title="Class representing function $f(x,u) = Ax+Bu$." alt="" coords="213,56,272,83"></map></td></tr> 38 <tr><td><img src="inherit__graph__4.png" border="0" alt="" usemap="#mpdf_map"> 38 <tr><td><img src="inherit__graph__4.png" border="0" alt="" usemap="#itpp_1_1Gamma__RNG_map"> 39 <map name="itpp_1_1Gamma__RNG_map"> 40 <area shape="rect" href="classitpp_1_1Gamma__RNG.html" title="Gamma distribution." alt="" coords="5,5,149,32"></map></td></tr> 41 <tr><td><img src="inherit__graph__5.png" border="0" alt="" usemap="#KalmanFull_map"> 42 <map name="KalmanFull_map"> 43 <area shape="rect" href="classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted..." alt="" coords="5,5,96,32"></map></td></tr> 44 <tr><td><img src="inherit__graph__6.png" border="0" alt="" usemap="#mgamma_map"> 45 <map name="mgamma_map"> 46 <area shape="rect" href="classmgamma.html" title="Gamma random walk." alt="" coords="5,5,91,32"></map></td></tr> 47 <tr><td><img src="inherit__graph__7.png" border="0" alt="" usemap="#mlnorm_3_01sq__T_01_4_map"> 48 <map name="mlnorm_3_01sq__T_01_4_map"> 49 <area shape="rect" href="classmlnorm.html" title="Normal distributed linear function with linear function of mean value;." alt="" coords="7,5,135,32"></map></td></tr> 50 <tr><td><img src="inherit__graph__8.png" border="0" alt="" usemap="#mpdf_map"> 39 51 <map name="mpdf_map"> 40 52 <area shape="rect" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies." alt="" coords="5,5,61,32"></map></td></tr> 41 <tr><td><img src="inherit__graph__ 5.png" border="0" alt="" usemap="#RV_map">53 <tr><td><img src="inherit__graph__9.png" border="0" alt="" usemap="#RV_map"> 42 54 <map name="RV_map"> 43 55 <area shape="rect" href="classRV.html" title="Class representing variables, most often random variables." alt="" coords="7,5,44,32"></map></td></tr> 44 <tr><td><img src="inherit__graph__ 6.png" border="0" alt="" usemap="#sqmat_map">56 <tr><td><img src="inherit__graph__10.png" border="0" alt="" usemap="#sqmat_map"> 45 57 <map name="sqmat_map"> 46 58 <area shape="rect" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form..." alt="" coords="7,5,68,32"><area shape="rect" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix." alt="" coords="119,5,185,32"></map></td></tr> 47 59 </table> 48 <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:462008 for mixpp by 60 <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:58 2008 for mixpp by 49 61 <a href="http://www.doxygen.org/index.html"> 50 62 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/itpp__ext_8h-source.html ¶
r28 r32 27 27 <a name="l00012"></a>00012 <span class="preprocessor">#include <itpp/itbase.h></span> 28 28 <a name="l00013"></a>00013 29 <a name="l00014"></a>00014 <span class="keyword">namespace </span>itpp { 30 <a name="l00015"></a>00015 Array<int> to_Arr(<span class="keyword">const</span> ivec &indices); 31 <a name="l00016"></a>00016 } 32 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by 29 <a name="l00014"></a>00014 <span class="keyword">using</span> std::cout; 30 <a name="l00015"></a>00015 <span class="keyword">using</span> std::endl; 31 <a name="l00016"></a>00016 32 <a name="l00017"></a>00017 <span class="keyword">namespace </span>itpp { 33 <a name="l00018"></a>00018 Array<int> to_Arr(<span class="keyword">const</span> ivec &indices); 34 <a name="l00019"></a>00019 35 <a name="l00024"></a><a class="code" href="classitpp_1_1Gamma__RNG.html">00024</a> <span class="keyword">class </span><a class="code" href="classitpp_1_1Gamma__RNG.html" title="Gamma distribution.">Gamma_RNG</a> { 36 <a name="l00025"></a>00025 <span class="keyword">public</span>: 37 <a name="l00027"></a>00027 <a class="code" href="classitpp_1_1Gamma__RNG.html#e132860f825f427d63652edd02c25b54" title="constructor. Set lambda.">Gamma_RNG</a>(<span class="keywordtype">double</span> a=1.0, <span class="keywordtype">double</span> b=1.0); 38 <a name="l00029"></a><a class="code" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe">00029</a> <span class="keywordtype">void</span> <a class="code" href="classitpp_1_1Gamma__RNG.html#dfaae19411e39aa87e1f72e409b6babe" title="Set lambda.">setup</a>(<span class="keywordtype">double</span> a0, <span class="keywordtype">double</span> b0) { alpha=a0; beta=b0;} 39 <a name="l00031"></a>00031 <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Gamma__RNG.html#8e666953249038f262cece2d3ed952d6" title="get lambda">get_setup</a>() <span class="keyword">const</span>; 40 <a name="l00033"></a><a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e">00033</a> <span class="keywordtype">double</span> <a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e" title="Get one sample.">operator()</a>() { <span class="keywordflow">return</span> sample(); } 41 <a name="l00035"></a>00035 vec <a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e" title="Get one sample.">operator()</a>(<span class="keywordtype">int</span> n); 42 <a name="l00037"></a>00037 mat <a class="code" href="classitpp_1_1Gamma__RNG.html#98e2e65456bca33fca602b2bd607235e" title="Get one sample.">operator()</a>(<span class="keywordtype">int</span> h, <span class="keywordtype">int</span> w); 43 <a name="l00038"></a>00038 <span class="keyword">protected</span>: 44 <a name="l00039"></a>00039 <span class="keyword">private</span>: 45 <a name="l00041"></a>00041 <span class="keywordtype">double</span> sample(); 46 <a name="l00043"></a>00043 <span class="keywordtype">double</span> alpha; 47 <a name="l00045"></a>00045 <span class="keywordtype">double</span> beta; 48 <a name="l00047"></a>00047 Random_Generator RNG; 49 <a name="l00048"></a>00048 Normal_RNG NRNG; 50 <a name="l00050"></a>00050 <span class="keyword">inline</span> <span class="keywordtype">double</span> exp_rand(){<span class="keywordflow">return</span> -std::log(RNG.random_01());} 51 <a name="l00051"></a>00051 <span class="keyword">inline</span> <span class="keywordtype">double</span> unif_rand(){<span class="keywordflow">return</span> RNG.random_01();} 52 <a name="l00052"></a>00052 <span class="keyword">inline</span> <span class="keywordtype">double</span> norm_rand(){<span class="keywordflow">return</span> NRNG.sample();} 53 <a name="l00053"></a>00053 54 <a name="l00054"></a>00054 }; 55 <a name="l00055"></a>00055 } 56 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 33 57 <a href="http://www.doxygen.org/index.html"> 34 58 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libBM_8h-source.html ¶
r28 r32 23 23 <a name="l00019"></a>00019 <span class="keyword">using namespace </span>itpp; 24 24 <a name="l00020"></a>00020 25 <a name="l00026"></a><a class="code" href="classRV.html">00026</a> <span class="keyword">class </span><a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> { 26 <a name="l00028"></a>00028 <span class="keywordtype">int</span> size; 27 <a name="l00030"></a>00030 <span class="keywordtype">int</span> len; 28 <a name="l00031"></a>00031 ivec ids; 29 <a name="l00032"></a>00032 ivec sizes; 30 <a name="l00033"></a>00033 ivec times; 31 <a name="l00034"></a>00034 ivec obs; 32 <a name="l00035"></a>00035 Array<std::string> names; 33 <a name="l00036"></a>00036 34 <a name="l00037"></a>00037 <span class="keyword">private</span>: 35 <a name="l00038"></a>00038 <span class="keywordtype">void</span> init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); 36 <a name="l00039"></a>00039 <span class="keyword">public</span>: 37 <a name="l00041"></a>00041 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); 38 <a name="l00043"></a>00043 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec ids ); 39 <a name="l00045"></a>00045 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> (); 40 <a name="l00046"></a>00046 41 <a name="l00048"></a>00048 <span class="keyword">friend</span> std::ostream &<a class="code" href="classRV.html#cad6f15535d10437f6690cb4492176a8" title="Printing output e.g. for debugging.">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ); 42 <a name="l00049"></a>00049 43 <a name="l00051"></a><a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0">00051</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> size;} ; 44 <a name="l00052"></a>00052 <span class="comment">//TODO why not inline and later??</span> 45 <a name="l00053"></a>00053 46 <a name="l00055"></a>00055 ivec <a class="code" href="classRV.html#6b078b1086224aca3a9e5a203e647fb6" title="Find indexes of another rv in self.">find</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2); 47 <a name="l00057"></a>00057 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <span class="keyword">add</span>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2); 48 <a name="l00059"></a>00059 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#4c5ec5e913fc598e242cb930ae8bdf4a" title="Subtract another variable from the current one.">subt</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2); 49 <a name="l00061"></a>00061 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#2bf35b18a32aad419f0516273939628e" title="Select only variables at indeces ind.">subselect</a>(ivec ind); 50 <a name="l00063"></a>00063 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45" title="Select only variables at indeces ind.">operator()</a>(ivec ind); 51 <a name="l00065"></a>00065 <span class="keywordtype">void</span> <a class="code" href="classRV.html#e0a158d53ab9430627241f844f4c9a60" title="Generate new RV with time shifted by delta.">t</a>(<span class="keywordtype">int</span> delta); 52 <a name="l00067"></a>00067 ivec <a class="code" href="classRV.html#8470cf53be6e7bdba78ad0efbd203ee7" title="generate a list of indeces, i.e. which">indexlist</a>(); 53 <a name="l00068"></a>00068 }; 54 <a name="l00069"></a>00069 55 <a name="l00070"></a>00070 56 <a name="l00071"></a>00071 25 <a name="l00027"></a><a class="code" href="classRV.html">00027</a> <span class="keyword">class </span><a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> { 26 <a name="l00028"></a>00028 <span class="keyword">protected</span>: 27 <a name="l00030"></a><a class="code" href="classRV.html#0cae53d262be90a775a99a198e17fa58">00030</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#0cae53d262be90a775a99a198e17fa58" title="size = sum of sizes">size</a>; 28 <a name="l00032"></a><a class="code" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9">00032</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#0d7b36e2bbccf880c8fcf1e8cc43c1a9" title="len = number of individual rvs">len</a>; 29 <a name="l00033"></a>00033 ivec ids; 30 <a name="l00034"></a>00034 ivec sizes; 31 <a name="l00035"></a>00035 ivec times; 32 <a name="l00036"></a>00036 ivec obs; 33 <a name="l00037"></a>00037 Array<std::string> names; 34 <a name="l00038"></a>00038 35 <a name="l00039"></a>00039 <span class="keyword">private</span>: 36 <a name="l00040"></a>00040 <span class="keywordtype">void</span> init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); 37 <a name="l00041"></a>00041 <span class="keyword">public</span>: 38 <a name="l00043"></a>00043 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times, ivec in_obs ); 39 <a name="l00045"></a>00045 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> ( ivec ids ); 40 <a name="l00047"></a>00047 <a class="code" href="classRV.html#6a22f5c06d6403870d4e414b1993bf9e" title="Empty constructor will be set later.">RV</a> (); 41 <a name="l00048"></a>00048 42 <a name="l00050"></a>00050 <span class="keyword">friend</span> std::ostream &<a class="code" href="classRV.html#cad6f15535d10437f6690cb4492176a8" title="Printing output e.g. for debugging.">operator<< </a>( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ); 43 <a name="l00051"></a>00051 44 <a name="l00053"></a><a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0">00053</a> <span class="keywordtype">int</span> <a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="classRV.html#0cae53d262be90a775a99a198e17fa58" title="size = sum of sizes">size</a>;} ; 45 <a name="l00054"></a>00054 46 <a name="l00055"></a>00055 <span class="comment">//TODO why not inline and later??</span> 47 <a name="l00056"></a>00056 48 <a name="l00058"></a>00058 ivec <a class="code" href="classRV.html#6b078b1086224aca3a9e5a203e647fb6" title="Find indexes of another rv in self.">find</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2 ); 49 <a name="l00060"></a>00060 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <span class="keyword">add</span> (<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv2 ); 50 <a name="l00062"></a>00062 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#4c5ec5e913fc598e242cb930ae8bdf4a" title="Subtract another variable from the current one.">subt</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv2 ); 51 <a name="l00064"></a>00064 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#2bf35b18a32aad419f0516273939628e" title="Select only variables at indeces ind.">subselect</a> ( ivec ind ); 52 <a name="l00066"></a>00066 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classRV.html#28bbcb8873bafdac317bafb7b481cc45" title="Select only variables at indeces ind.">operator() </a>( ivec ind ); 53 <a name="l00068"></a>00068 <span class="keywordtype">void</span> <a class="code" href="classRV.html#e0a158d53ab9430627241f844f4c9a60" title="Generate new RV with time shifted by delta.">t</a> ( <span class="keywordtype">int</span> delta ); 54 <a name="l00070"></a>00070 ivec <a class="code" href="classRV.html#8470cf53be6e7bdba78ad0efbd203ee7" title="generate a list of indeces, i.e. which">indexlist</a>(); 55 <a name="l00071"></a>00071 }; 57 56 <a name="l00072"></a>00072 58 <a name="l00074"></a><a class="code" href="classfnc.html">00074</a> <span class="keyword">class </span><a class="code" href="classfnc.html" title="Class representing function $f(x)$ of variable $x$ represented by rv.">fnc</a> { 59 <a name="l00075"></a>00075 <span class="keyword">protected</span>: 60 <a name="l00076"></a>00076 <span class="keywordtype">int</span> dimy; 61 <a name="l00077"></a>00077 <span class="keyword">public</span>: 62 <a name="l00079"></a><a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">00079</a> <span class="keyword">virtual</span> vec <a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c" title="function evaluates numerical value of $f(x)$ at $x=cond$">eval</a>(<span class="keyword">const</span> vec &cond){}; <span class="comment">//Fixme: virtual?</span> 63 <a name="l00081"></a><a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298">00081</a> <span class="comment"></span> <span class="keywordtype">int</span> <a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298" title="access function">_dimy</a>()<span class="keyword">const</span>{<span class="keywordflow">return</span> dimy;} 64 <a name="l00082"></a>00082 }; 57 <a name="l00074"></a>00074 58 <a name="l00075"></a><a class="code" href="classfnc.html">00075</a> <span class="keyword">class </span><a class="code" href="classfnc.html" title="Class representing function $f(x)$ of variable $x$ represented by rv.">fnc</a> { 59 <a name="l00076"></a>00076 <span class="keyword">protected</span>: 60 <a name="l00077"></a>00077 <span class="keywordtype">int</span> dimy; 61 <a name="l00078"></a>00078 <span class="keyword">public</span>: 62 <a name="l00080"></a><a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c">00080</a> <span class="keyword">virtual</span> vec <a class="code" href="classfnc.html#7fad2e6cb35909a165ec5a53def4a18c" title="function evaluates numerical value of $f(x)$ at $x=cond$">eval</a> ( <span class="keyword">const</span> vec &cond ) { 63 <a name="l00081"></a>00081 <span class="keywordflow">return</span> vec ( 0 ); 64 <a name="l00082"></a>00082 }; <span class="comment">//Fixme: virtual?</span> 65 65 <a name="l00083"></a>00083 66 <a name="l00087"></a><a class="code" href="classBM.html">00087</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 67 <a name="l00088"></a>00088 <span class="keyword">public</span>: 68 <a name="l00090"></a><a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">00090</a> <span class="keywordtype">double</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>; 69 <a name="l00092"></a><a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">00092</a> <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>; 66 <a name="l00085"></a><a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298">00085</a> <span class="keywordtype">int</span> <a class="code" href="classfnc.html#a8891973d0ca48ce38e1886df45ca298" title="access function">_dimy</a>()<span class="keyword"> const</span>{<span class="keywordflow">return</span> dimy;} 67 <a name="l00086"></a>00086 68 <a name="l00088"></a><a class="code" href="classfnc.html#17164c202f6feee3d708b8caab6306ab">00088</a> <span class="keyword">virtual</span> <a class="code" href="classfnc.html#17164c202f6feee3d708b8caab6306ab" title="Destructor for future use;.">~fnc</a>() {}; 69 <a name="l00089"></a>00089 }; 70 <a name="l00090"></a>00090 71 <a name="l00091"></a>00091 70 72 <a name="l00093"></a>00093 71 <a name="l00095"></a><a class="code" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae">00095</a> <a class="code" href="classBM.html#ef32a12f4f89e4000bf5390ceda762ae" title="Default constructor.">BM</a>():<a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>(0),evall(true){}; 72 <a name="l00096"></a>00096 73 <a name="l00100"></a>00100 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &dt) = 0; 74 <a name="l00102"></a>00102 <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); 75 <a name="l00104"></a>00104 <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classBM.html#a5b8f6c8a872738cfaa30ab010e8c077" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>(); 76 <a name="l00105"></a>00105 }; 77 <a name="l00106"></a>00106 78 <a name="l00108"></a><a class="code" href="classepdf.html">00108</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 79 <a name="l00109"></a>00109 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 80 <a name="l00110"></a>00110 <span class="keyword">public</span>: 81 <a name="l00112"></a>00112 <span class="comment">// virtual vec moment ( const int order = 1 );</span> 82 <a name="l00114"></a>00114 <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa" title="Returns the required moment of the epdf.">sample</a> ()=0; 83 <a name="l00116"></a><a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">00116</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc" title="Compute probability of argument val.">eval</a>(<span class="keyword">const</span> vec &val){}; 84 <a name="l00117"></a>00117 }; 85 <a name="l00118"></a>00118 86 <a name="l00120"></a><a class="code" href="classmpdf.html">00120</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 87 <a name="l00122"></a>00122 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 88 <a name="l00124"></a>00124 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvc; 89 <a name="l00125"></a>00125 <span class="keyword">public</span>: 90 <a name="l00126"></a>00126 91 <a name="l00128"></a>00128 <span class="comment">// virtual fnc moment ( const int order = 1 );</span> 92 <a name="l00130"></a><a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">00130</a> <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41" title="Returns the required moment of the epdf.">samplecond</a> (vec &cond, <span class="keywordtype">double</span> lik){}; 93 <a name="l00131"></a>00131 <span class="keyword">virtual</span> <span class="keywordtype">void</span> condition (vec &cond){}; 94 <a name="l00132"></a>00132 }; 95 <a name="l00133"></a>00133 96 <a name="l00140"></a><a class="code" href="classDS.html">00140</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { 97 <a name="l00141"></a>00141 <span class="keyword">protected</span>: 98 <a name="l00143"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00143</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; 99 <a name="l00145"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00145</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> 100 <a name="l00146"></a>00146 <span class="keyword">public</span>: 101 <a name="l00148"></a>00148 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a>(vec &dt); 102 <a name="l00150"></a>00150 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a>(vec &dt, ivec &indeces); 103 <a name="l00152"></a>00152 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a>(vec &ut); 104 <a name="l00154"></a>00154 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a>(vec &ut, ivec &indeces); 105 <a name="l00160"></a>00160 <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &urv); 106 <a name="l00161"></a>00161 107 <a name="l00163"></a>00163 <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system...">step</a>(); 108 <a name="l00164"></a>00164 }; 109 <a name="l00165"></a>00165 110 <a name="l00166"></a>00166 111 <a name="l00167"></a>00167 <span class="preprocessor">#endif // BM_H</span> 112 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by 73 <a name="l00094"></a><a class="code" href="classepdf.html">00094</a> <span class="keyword">class </span><a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 74 <a name="l00095"></a>00095 <span class="keyword">protected</span>: 75 <a name="l00096"></a>00096 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv; 76 <a name="l00097"></a>00097 <span class="keyword">public</span>: 77 <a name="l00099"></a><a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd">00099</a> <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a>() :rv ( ivec ( 0 ) ) {}; 78 <a name="l00100"></a>00100 79 <a name="l00102"></a><a class="code" href="classepdf.html#c95b1a27a8dd9507bb9a5a3cb2809c7a">00102</a> <a class="code" href="classepdf.html#d8eb760037b3bad5a0d64081606697cd" title="default constructor">epdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0 ) :rv ( rv0 ) {}; 80 <a name="l00103"></a>00103 81 <a name="l00105"></a>00105 <span class="comment">// virtual vec moment ( const int order = 1 );</span> 82 <a name="l00107"></a>00107 <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#7f74d871d50b9ff360f1b3879092a9fa" title="Returns the required moment of the epdf.">sample</a> () =0; 83 <a name="l00109"></a><a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc">00109</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &val ) {<span class="keywordflow">return</span> 0.0;}; 84 <a name="l00110"></a>00110 85 <a name="l00112"></a><a class="code" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51">00112</a> <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classepdf.html#113c76c61d20e3f2a24ba322a73dfc51" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &val ) {<span class="keywordflow">return</span> 0.0;}; 86 <a name="l00113"></a>00113 87 <a name="l00115"></a>00115 <span class="keyword">virtual</span> vec <a class="code" href="classepdf.html#5b61fae74d370d2216576d598c1a74ef" title="return expected value">mean</a>()=0; 88 <a name="l00116"></a>00116 89 <a name="l00118"></a><a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396">00118</a> <span class="keyword">virtual</span> <a class="code" href="classepdf.html#0a322dd106f04c0a2915e3d4f4227396" title="Destructor for future use;.">~epdf</a>() {}; 90 <a name="l00119"></a>00119 }; 91 <a name="l00120"></a>00120 92 <a name="l00121"></a>00121 93 <a name="l00123"></a>00123 <span class="comment">//TODO Samplecond can be generalized</span> 94 <a name="l00124"></a>00124 95 <a name="l00125"></a><a class="code" href="classmpdf.html">00125</a> <span class="keyword">class </span><a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 96 <a name="l00126"></a>00126 <span class="keyword">protected</span>: 97 <a name="l00128"></a><a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb">00128</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a>; 98 <a name="l00130"></a><a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab">00130</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a>; 99 <a name="l00132"></a><a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c">00132</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>; 100 <a name="l00133"></a>00133 <span class="keyword">public</span>: 101 <a name="l00134"></a>00134 102 <a name="l00136"></a>00136 <span class="comment">// virtual fnc moment ( const int order = 1 );</span> 103 <a name="l00138"></a><a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41">00138</a> <span class="comment"></span> <span class="keyword">virtual</span> vec <a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41" title="Returns the required moment of the epdf.">samplecond</a> ( vec &cond, <span class="keywordtype">double</span> lik ) {<span class="keywordflow">return</span> vec ( 0 );}; 104 <a name="l00139"></a>00139 105 <a name="l00140"></a>00140 <span class="keyword">virtual</span> <span class="keywordtype">void</span> condition ( <span class="keyword">const</span> vec &cond ) {}; 106 <a name="l00141"></a>00141 107 <a name="l00142"></a>00142 <span class="keyword">virtual</span> <span class="keywordtype">double</span> evalcond (<span class="keyword">const</span> vec &dt, <span class="keyword">const</span> vec &cond ) {this->condition(cond);<span class="keywordflow">return</span> <a class="code" href="classmpdf.html#7aa894208a32f3487827df6d5054424c" title="pointer to internal epdf">ep</a>-><a class="code" href="classepdf.html#f333ceeb88ebc37d81fcd4cea4526bfc" title="Compute probability of argument val.">eval</a>(dt);}; 108 <a name="l00143"></a>00143 109 <a name="l00145"></a><a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb">00145</a> <span class="keyword">virtual</span> <a class="code" href="classmpdf.html#6788be9f3a888796499c5293a318fcfb" title="Destructor for future use;.">~mpdf</a>() {}; 110 <a name="l00146"></a>00146 111 <a name="l00148"></a><a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f">00148</a> <a class="code" href="classmpdf.html#581ecf362185d37c08bb31cb9d046d6f" title="Default constructor.">mpdf</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc0 ) :<a class="code" href="classmpdf.html#f6687c07ff07d47812dd565368ca59eb" title="modeled random variable">rv</a> ( rv0 ),<a class="code" href="classmpdf.html#acb7dda792b3cd5576f39fa3129abbab" title="random variable in condition">rvc</a> ( rvc0 ) {}; 112 <a name="l00149"></a>00149 }; 113 <a name="l00150"></a>00150 114 <a name="l00158"></a><a class="code" href="classDS.html">00158</a> <span class="keyword">class </span><a class="code" href="classDS.html" title="Abstract class for discrete-time sources of data.">DS</a> { 115 <a name="l00159"></a>00159 <span class="keyword">protected</span>: 116 <a name="l00161"></a><a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454">00161</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#1012025a1a3a1fdd24aa48698a3d3454" title="Observed variables, returned by getdata().">Drv</a>; 117 <a name="l00163"></a><a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629">00163</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classDS.html#0a88ffaeb3c7c2cf30c69bc41a000629" title="Action variables, accepted by write().">Urv</a>; <span class="comment">//</span> 118 <a name="l00164"></a>00164 <span class="keyword">public</span>: 119 <a name="l00166"></a>00166 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt ); 120 <a name="l00168"></a>00168 <span class="keywordtype">void</span> <a class="code" href="classDS.html#db2dacc9e71a36eeb9c5c2ee402eeeb1" title="Returns full vector of observed data.">getdata</a> ( vec &dt, ivec &indeces ); 121 <a name="l00170"></a>00170 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut ); 122 <a name="l00172"></a>00172 <span class="keywordtype">void</span> <a class="code" href="classDS.html#0dfb6788b70c0d48a1f5276ed6c93039" title="Accepts action variable and schedule it for application.">write</a> ( vec &ut, ivec &indeces ); 123 <a name="l00178"></a>00178 <span class="keywordtype">void</span> <a class="code" href="classDS.html#9a35ca9c9321dce2bf63bf668f785b75" title="Method that assigns random variables to the datasource. Typically, the datasource...">linkrvs</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &drv, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &urv ); 124 <a name="l00179"></a>00179 125 <a name="l00181"></a>00181 <span class="keywordtype">void</span> <a class="code" href="classDS.html#470ba89e8e7c3c4d830803221b4e9be6" title="Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system...">step</a>(); 126 <a name="l00182"></a>00182 127 <a name="l00183"></a>00183 }; 128 <a name="l00184"></a>00184 129 <a name="l00189"></a><a class="code" href="classBM.html">00189</a> <span class="keyword">class </span><a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 130 <a name="l00190"></a>00190 <span class="keyword">protected</span>: 131 <a name="l00192"></a><a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88">00192</a> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> <a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>; 132 <a name="l00194"></a><a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979">00194</a> <span class="keywordtype">double</span> <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>; 133 <a name="l00196"></a><a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129">00196</a> <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>; 134 <a name="l00197"></a>00197 <span class="keyword">public</span>: 135 <a name="l00198"></a>00198 136 <a name="l00200"></a><a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a">00200</a> <a class="code" href="classBM.html#605d28b426adb677c86a57ddb525132a" title="Default constructor.">BM</a>(<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0) :<a class="code" href="classBM.html#af00f0612fabe66241dd507188cdbf88" title="Random variable of the posterior.">rv</a>(rv0), <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a> ( 0 ),<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a> ( true ) {<span class="comment">//Fixme: test rv </span> 137 <a name="l00201"></a>00201 }; 138 <a name="l00202"></a>00202 139 <a name="l00206"></a>00206 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &dt ) = 0; 140 <a name="l00208"></a>00208 <span class="keywordtype">void</span> <a class="code" href="classBM.html#a892eff438aab2dd1a9e2efcb7fb5bdf" title="Incremental Bayes rule.">bayes</a> ( mat Dt ); 141 <a name="l00210"></a>00210 <span class="keyword">virtual</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classBM.html#3dc45554556926bde996a267636abe55" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>()=0; 142 <a name="l00211"></a>00211 143 <a name="l00213"></a><a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd">00213</a> <span class="keyword">virtual</span> <a class="code" href="classBM.html#ca0f02b3b4144e0895cc14f7e0374bdd" title="Destructor for future use;.">~BM</a>() {}; 144 <a name="l00214"></a>00214 }; 145 <a name="l00215"></a>00215 146 <a name="l00225"></a><a class="code" href="classBMcond.html">00225</a> <span class="keyword">class </span><a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a> { 147 <a name="l00226"></a>00226 <span class="keyword">protected</span>: 148 <a name="l00227"></a>00227 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvc; 149 <a name="l00228"></a>00228 <span class="keyword">public</span>: 150 <a name="l00230"></a>00230 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classBMcond.html#3543cfe274c35f9033c24d8036a96c4d" title="Substitute val for rvc.">condition</a> ( <span class="keyword">const</span> vec &val ) =0; 151 <a name="l00231"></a>00231 <span class="keyword">virtual</span> ~<a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a>(){}; 152 <a name="l00232"></a>00232 }; 153 <a name="l00233"></a>00233 154 <a name="l00234"></a>00234 <span class="preprocessor">#endif // BM_H</span> 155 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 113 156 <a href="http://www.doxygen.org/index.html"> 114 157 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libBM_8h.html ¶
r28 r32 33 33 <p><center><img src="libBM_8h__dep__incl.png" border="0" usemap="#work/mixpp/bdm/stat/libBM.hdep_map" alt=""></center> 34 34 <map name="work/mixpp/bdm/stat/libBM.hdep_map"> 35 <area shape="rect" href="libFN_8h-source.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="9,84,215,111"><area shape="rect" href="lib PF_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="239,84,452,111"><area shape="rect" href="libDS_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="476,84,684,111"><area shape="rect" href="libEF_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="708,84,911,111"><area shape="rect" href="libKF_8h.html" title="work/mixpp/bdm/estim/libKF.h" alt="" coords="5,161,219,188"></map>35 <area shape="rect" href="libFN_8h-source.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="9,84,215,111"><area shape="rect" href="libEF_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="239,84,441,111"><area shape="rect" href="libDS_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="465,84,673,111"><area shape="rect" href="libKF_8h.html" title="work/mixpp/bdm/estim/libKF.h" alt="" coords="5,161,219,188"><area shape="rect" href="libPF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="243,161,456,188"></map> 36 36 </div> 37 37 … … 46 46 47 47 <tr><td class="mdescLeft"> </td><td class="mdescRight">Class representing function $f(x)$ of variable $x$ represented by <code>rv</code>. <a href="classfnc.html#_details">More...</a><br></td></tr> 48 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html">BM</a></td></tr>49 50 <tr><td class="mdescLeft"> </td><td class="mdescRight">Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. <a href="classBM.html#_details">More...</a><br></td></tr>51 48 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classepdf.html">epdf</a></td></tr> 52 49 … … 58 55 59 56 <tr><td class="mdescLeft"> </td><td class="mdescRight">Abstract class for discrete-time sources of data. <a href="classDS.html#_details">More...</a><br></td></tr> 57 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classBM.html">BM</a></td></tr> 58 59 <tr><td class="mdescLeft"> </td><td class="mdescRight">Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. <a href="classBM.html#_details">More...</a><br></td></tr> 60 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classBMcond.html">BMcond</a></td></tr> 61 62 <tr><td class="mdescLeft"> </td><td class="mdescRight">Conditional Bayesian Filter. <a href="classBMcond.html#_details">More...</a><br></td></tr> 60 63 </table> 61 64 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 64 67 <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 65 68 ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 66 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 69 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 67 70 <a href="http://www.doxygen.org/index.html"> 68 71 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libBM_8h__dep__incl.map ¶
r23 r32 1 1 <area shape="rect" href="$libFN_8h-source.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="9,84,215,111"> 2 <area shape="rect" href="$libPF_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="239,84,452,111"> 3 <area shape="rect" href="$libDS_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="476,84,684,111"> 4 <area shape="rect" href="$libEF_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="708,84,911,111"> 2 <area shape="rect" href="$libEF_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="239,84,441,111"> 3 <area shape="rect" href="$libDS_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations." alt="" coords="465,84,673,111"> 5 4 <area shape="rect" href="$libKF_8h.html" title="work/mixpp/bdm/estim/libKF.h" alt="" coords="5,161,219,188"> 5 <area shape="rect" href="$libPF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="243,161,456,188"> -
TabularUnified doc/html/libBM_8h__dep__incl.md5 ¶
r23 r32 1 567b476638c518afc6dfe7675e690d09 1 9450d1c1c6cb8874759b57546121f5bc -
TabularUnified doc/html/libDC_8h-source.html ¶
r28 r32 29 29 <a name="l00039"></a>00039 <span class="keyword">virtual</span> mat <a class="code" href="classsqmat.html#9a5b6fddfeb42339e1dc9b978a2590fc" title="Conversion to full matrix.">to_mat</a>() =0; 30 30 <a name="l00040"></a>00040 31 <a name="l00045"></a>00045 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C, <span class="keywordtype">bool</span> trans=<span class="keyword">true</span> ) =0; 32 <a name="l00046"></a>00046 33 <a name="l00047"></a>00047 34 <a name="l00052"></a>00052 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547" title="Logarithm of a determinant.">logdet</a>() =0; 35 <a name="l00053"></a>00053 36 <a name="l00059"></a>00059 <span class="keyword">virtual</span> vec <a class="code" href="classsqmat.html#b5236c8a050199e1a9d338b0da1a08d2" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a> ( vec &v ) =0; 37 <a name="l00060"></a>00060 38 <a name="l00065"></a>00065 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#44e079468bc8bfccf634dc85b32ba6be" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a> ( vec &v ) =0; 39 <a name="l00066"></a>00066 40 <a name="l00067"></a>00067 <span class="comment">// //! easy version of the</span> 41 <a name="l00068"></a>00068 <span class="comment">// sqmat inv();</span> 42 <a name="l00069"></a>00069 43 <a name="l00071"></a>00071 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>() =0; 44 <a name="l00072"></a>00072 45 <a name="l00074"></a><a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b">00074</a> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> dim;}; 46 <a name="l00075"></a>00075 47 <a name="l00077"></a><a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646">00077</a> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> dim;}; 48 <a name="l00078"></a>00078 49 <a name="l00079"></a>00079 <span class="keyword">protected</span>: 50 <a name="l00080"></a>00080 <span class="keywordtype">int</span> dim; 51 <a name="l00081"></a>00081 }; 31 <a name="l00044"></a>00044 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C ) =0; 32 <a name="l00045"></a>00045 33 <a name="l00049"></a>00049 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325" title="Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C&#39;*V*C$...">mult_sym_t</a> ( <span class="keyword">const</span> mat &C ) =0; 34 <a name="l00050"></a>00050 35 <a name="l00051"></a>00051 36 <a name="l00056"></a>00056 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#0a772b396750eeeed85d69fa72478b45" title="Logarithm of a determinant.">logdet</a>() <span class="keyword">const</span> =0; 37 <a name="l00057"></a>00057 38 <a name="l00063"></a>00063 <span class="keyword">virtual</span> vec <a class="code" href="classsqmat.html#975ddc7e8035d8d4e6cbd52dd99c248c" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a> (<span class="keyword">const</span> vec &v ) =0; 39 <a name="l00064"></a>00064 40 <a name="l00069"></a>00069 <span class="keyword">virtual</span> <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#90f97cdf9de08ead4f0648419b3aa4ce" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a> (<span class="keyword">const</span> vec &v ) =0; 41 <a name="l00070"></a>00070 42 <a name="l00071"></a>00071 <span class="comment">// //! easy version of the</span> 43 <a name="l00072"></a>00072 <span class="comment">// sqmat inv();</span> 44 <a name="l00073"></a>00073 45 <a name="l00075"></a>00075 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>() =0; 46 <a name="l00076"></a>00076 47 <a name="l00078"></a><a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b">00078</a> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> dim;}; 48 <a name="l00079"></a>00079 49 <a name="l00081"></a><a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646">00081</a> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> dim;}; 52 50 <a name="l00082"></a>00082 53 <a name="l00083"></a>00083 54 <a name="l00088"></a><a class="code" href="classfsqmat.html">00088</a> <span class="keyword">class </span><a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>: <span class="keyword">public</span> <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> 55 <a name="l00089"></a>00089 { 56 <a name="l00090"></a>00090 <span class="keyword">protected</span>: 57 <a name="l00091"></a>00091 mat M; 58 <a name="l00092"></a>00092 <span class="keyword">public</span>: 59 <a name="l00093"></a>00093 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#b36530e155667fe9f1bd58394e50c65a">opupdt</a> ( <span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> w ); 60 <a name="l00094"></a>00094 mat <a class="code" href="classfsqmat.html#cedf4f048309056f4262c930914dfda8" title="Conversion to full matrix.">to_mat</a>() ; 61 <a name="l00095"></a>00095 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 62 <a name="l00096"></a>00096 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C, <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &U, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 63 <a name="l00097"></a>00097 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#cfa4c359483d2322f32d1d50050f8ac4" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); 64 <a name="l00098"></a>00098 65 <a name="l00099"></a>00099 66 <a name="l00100"></a>00100 <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>(); <span class="comment">// mat will be initialized OK</span> 67 <a name="l00102"></a>00102 <span class="comment"></span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> ( <span class="keyword">const</span> mat &M ); 68 <a name="l00103"></a>00103 69 <a name="l00109"></a>00109 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#9fa853e1ca28f2a1a1c43377e798ecb1" title="Matrix inversion preserving the chosen form.">inv</a> ( <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &Inv ); 70 <a name="l00110"></a>00110 71 <a name="l00111"></a><a class="code" href="classfsqmat.html#bf212272ec195ad2706e2bf4d8e7c9b3">00111</a> <span class="keywordtype">double</span> <a class="code" href="classfsqmat.html#bf212272ec195ad2706e2bf4d8e7c9b3" title="Logarithm of a determinant.">logdet</a>() {<span class="keywordflow">return</span> log ( det ( M ) );}; 72 <a name="l00112"></a><a class="code" href="classfsqmat.html#6d047b9f7a27dfc093303a13cc9b1fba">00112</a> <span class="keywordtype">double</span> <a class="code" href="classfsqmat.html#6d047b9f7a27dfc093303a13cc9b1fba" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a> ( vec &v ) {<span class="keywordflow">return</span> ( v* ( M*v ) );}; 73 <a name="l00113"></a><a class="code" href="classfsqmat.html#6648dd4291b809cce14e8497d0433ad3">00113</a> vec <a class="code" href="classfsqmat.html#6648dd4291b809cce14e8497d0433ad3" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a> ( vec &v ) {it_error ( <span class="stringliteral">"not implemented"</span> );<span class="keywordflow">return</span> v;}; 74 <a name="l00114"></a>00114 75 <a name="l00115"></a>00115 <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>& operator += ( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {M+=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; 76 <a name="l00116"></a>00116 <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>& operator -= ( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {M-=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; 77 <a name="l00117"></a>00117 <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>& operator *= ( <span class="keywordtype">double</span> x ) {M*=x;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; 78 <a name="l00118"></a>00118 <span class="comment">// fsqmat& operator = ( const fsqmat &A) {M=A.M; return *this;};</span> 79 <a name="l00119"></a>00119 }; 80 <a name="l00120"></a>00120 81 <a name="l00121"></a>00121 <span class="keyword">class </span>ldmat: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> 82 <a name="l00122"></a>00122 { 83 <a name="l00123"></a>00123 <span class="keyword">public</span>: 51 <a name="l00084"></a><a class="code" href="classsqmat.html#0481f2067bb32aaea7e6d4f27e46b656">00084</a> <span class="keyword">virtual</span> <a class="code" href="classsqmat.html#0481f2067bb32aaea7e6d4f27e46b656" title="Destructor for future use;.">~sqmat</a>(){}; 52 <a name="l00085"></a>00085 <span class="keyword">protected</span>: 53 <a name="l00086"></a>00086 <span class="keywordtype">int</span> dim; 54 <a name="l00087"></a>00087 }; 55 <a name="l00088"></a>00088 56 <a name="l00089"></a>00089 57 <a name="l00094"></a><a class="code" href="classfsqmat.html">00094</a> <span class="keyword">class </span><a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>: <span class="keyword">public</span> <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> 58 <a name="l00095"></a>00095 { 59 <a name="l00096"></a>00096 <span class="keyword">protected</span>: 60 <a name="l00097"></a>00097 mat M; 61 <a name="l00098"></a>00098 <span class="keyword">public</span>: 62 <a name="l00099"></a>00099 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#b36530e155667fe9f1bd58394e50c65a">opupdt</a> ( <span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> w ); 63 <a name="l00100"></a>00100 mat <a class="code" href="classfsqmat.html#cedf4f048309056f4262c930914dfda8" title="Conversion to full matrix.">to_mat</a>() ; 64 <a name="l00101"></a>00101 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#5530d2756b5d991de755e6121c9a452e" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C); 65 <a name="l00102"></a>00102 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#92052a8adc2054b63e42d1373d145c89" title="Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C&#39;*V*C$...">mult_sym_t</a> ( <span class="keyword">const</span> mat &C); 66 <a name="l00103"></a>00103 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#5530d2756b5d991de755e6121c9a452e" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C, <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &U); 67 <a name="l00104"></a>00104 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#92052a8adc2054b63e42d1373d145c89" title="Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C&#39;*V*C$...">mult_sym_t</a> ( <span class="keyword">const</span> mat &C, <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &U); 68 <a name="l00105"></a>00105 <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#cfa4c359483d2322f32d1d50050f8ac4" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); 69 <a name="l00106"></a>00106 70 <a name="l00108"></a>00108 <a class="code" href="classfsqmat.html#79e3f73e0ccd663c7f7e08083d272940" title="Default initialization.">fsqmat</a>(); <span class="comment">// mat will be initialized OK</span> 71 <a name="l00110"></a>00110 <span class="comment"></span> <a class="code" href="classfsqmat.html#79e3f73e0ccd663c7f7e08083d272940" title="Default initialization.">fsqmat</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> dim0); <span class="comment">// mat will be initialized OK</span> 72 <a name="l00112"></a>00112 <span class="comment"></span> <a class="code" href="classfsqmat.html#79e3f73e0ccd663c7f7e08083d272940" title="Default initialization.">fsqmat</a> ( <span class="keyword">const</span> mat &M ); 73 <a name="l00113"></a>00113 74 <a name="l00115"></a><a class="code" href="classfsqmat.html#2a8f104e4befbc2aa90d8b11edfedb2e">00115</a> <span class="keyword">virtual</span> <a class="code" href="classfsqmat.html#2a8f104e4befbc2aa90d8b11edfedb2e" title="Destructor for future use;.">~fsqmat</a>(){}; 75 <a name="l00116"></a>00116 76 <a name="l00117"></a>00117 77 <a name="l00123"></a>00123 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classfsqmat.html#9fa853e1ca28f2a1a1c43377e798ecb1" title="Matrix inversion preserving the chosen form.">inv</a> ( <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &Inv ); 84 78 <a name="l00124"></a>00124 85 <a name="l00126"></a>00126 ldmat ( <span class="keyword">const</span> mat &L, <span class="keyword">const</span> vec &D ); 86 <a name="l00128"></a>00128 ldmat ( mat V ); 87 <a name="l00130"></a>00130 ldmat ( vec D0 ); 88 <a name="l00131"></a>00131 ldmat (); 89 <a name="l00132"></a>00132 90 <a name="l00133"></a>00133 <span class="comment">// Reimplementation of compulsory operatios</span> 91 <a name="l00134"></a>00134 92 <a name="l00135"></a>00135 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#b223484796661f2dadb5607a86ce0581">opupdt</a> ( <span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> w ); 93 <a name="l00136"></a>00136 mat <a class="code" href="classsqmat.html#9a5b6fddfeb42339e1dc9b978a2590fc" title="Conversion to full matrix.">to_mat</a>(); 94 <a name="l00137"></a>00137 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 95 <a name="l00138"></a>00138 <span class="keywordtype">void</span> <span class="keyword">add</span> ( <span class="keyword">const</span> ldmat &ld2, <span class="keywordtype">double</span> w=1.0 ); 96 <a name="l00139"></a>00139 <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#5c852819589f74cdaefbd648c0ce8547" title="Logarithm of a determinant.">logdet</a>(); 97 <a name="l00140"></a>00140 <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#44e079468bc8bfccf634dc85b32ba6be" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a> ( vec &v ); 98 <a name="l00141"></a>00141 <span class="comment">// sqmat& operator -= ( const sqmat & ld2 );</span> 99 <a name="l00142"></a>00142 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); 100 <a name="l00143"></a>00143 <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols</a>(); 101 <a name="l00144"></a>00144 <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">rows</a>(); 102 <a name="l00145"></a>00145 vec <a class="code" href="classsqmat.html#b5236c8a050199e1a9d338b0da1a08d2" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a> ( vec &v ); 103 <a name="l00146"></a>00146 104 <a name="l00152"></a>00152 <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv ( ldmat &Inv ); 105 <a name="l00153"></a>00153 106 <a name="l00159"></a>00159 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#faa3bc90be142adde9cf74f573c70157" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C, ldmat &U, <span class="keywordtype">bool</span> trans=<span class="keyword">false</span> ); 107 <a name="l00160"></a>00160 108 <a name="l00169"></a>00169 <span class="keywordtype">void</span> ldform ( mat &A, vec &D0 ); 79 <a name="l00125"></a><a class="code" href="classfsqmat.html#eb0d1358f536e4453b5f99d0418ca1e5">00125</a> <span class="keywordtype">double</span> <a class="code" href="classfsqmat.html#eb0d1358f536e4453b5f99d0418ca1e5" title="Logarithm of a determinant.">logdet</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> log ( det ( M ) );}; 80 <a name="l00126"></a><a class="code" href="classfsqmat.html#1eec8762a2299d83c7b7cd6bf6cbc1ad">00126</a> <span class="keywordtype">double</span> <a class="code" href="classfsqmat.html#1eec8762a2299d83c7b7cd6bf6cbc1ad" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a> (<span class="keyword">const</span> vec &v ) {<span class="keywordflow">return</span> ( v* ( M*v ) );}; 81 <a name="l00127"></a><a class="code" href="classfsqmat.html#2288389e2d47bd9df112815ef570c5c9">00127</a> vec <a class="code" href="classfsqmat.html#2288389e2d47bd9df112815ef570c5c9" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a> (<span class="keyword">const</span> vec &v ) {it_error ( <span class="stringliteral">"not implemented"</span> );<span class="keywordflow">return</span> v;}; 82 <a name="l00128"></a>00128 83 <a name="l00129"></a>00129 <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>& operator += ( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {M+=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; 84 <a name="l00130"></a>00130 <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>& operator -= ( <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &A ) {M-=A.<a class="code" href="classfsqmat.html#a7a1fcb9aae19d1e4daddfc9c22ce453">M</a>;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; 85 <a name="l00131"></a>00131 <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>& operator *= ( <span class="keywordtype">double</span> x ) {M*=x;<span class="keywordflow">return</span> *<span class="keyword">this</span>;}; 86 <a name="l00132"></a>00132 <span class="comment">// fsqmat& operator = ( const fsqmat &A) {M=A.M; return *this;};</span> 87 <a name="l00133"></a>00133 88 <a name="l00134"></a>00134 <span class="keyword">friend</span> std::ostream &operator<< ( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a> &sq ); 89 <a name="l00135"></a>00135 90 <a name="l00136"></a>00136 }; 91 <a name="l00137"></a>00137 92 <a name="l00138"></a>00138 <span class="keyword">class </span>ldmat: <a class="code" href="classsqmat.html" title="Virtual class for representation of double symmetric matrices in square-root form...">sqmat</a> 93 <a name="l00139"></a>00139 { 94 <a name="l00140"></a>00140 <span class="keyword">public</span>: 95 <a name="l00141"></a>00141 96 <a name="l00143"></a>00143 ldmat ( <span class="keyword">const</span> mat &L, <span class="keyword">const</span> vec &D ); 97 <a name="l00145"></a>00145 ldmat (<span class="keyword">const</span> mat &V ); 98 <a name="l00147"></a>00147 ldmat ( vec D0 ); 99 <a name="l00149"></a>00149 ldmat (); 100 <a name="l00151"></a>00151 ldmat(<span class="keyword">const</span> <span class="keywordtype">int</span> dim0); 101 <a name="l00152"></a>00152 102 <a name="l00154"></a>00154 <span class="keyword">virtual</span> ~ldmat(){}; 103 <a name="l00155"></a>00155 104 <a name="l00156"></a>00156 <span class="comment">// Reimplementation of compulsory operatios</span> 105 <a name="l00157"></a>00157 106 <a name="l00158"></a>00158 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#b223484796661f2dadb5607a86ce0581">opupdt</a> ( <span class="keyword">const</span> vec &v, <span class="keywordtype">double</span> w ); 107 <a name="l00159"></a>00159 mat <a class="code" href="classsqmat.html#9a5b6fddfeb42339e1dc9b978a2590fc" title="Conversion to full matrix.">to_mat</a>(); 108 <a name="l00160"></a>00160 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C); 109 <a name="l00161"></a>00161 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325" title="Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C&#39;*V*C$...">mult_sym_t</a> ( <span class="keyword">const</span> mat &C); 110 <a name="l00162"></a>00162 <span class="keywordtype">void</span> <span class="keyword">add</span> ( <span class="keyword">const</span> ldmat &ld2, <span class="keywordtype">double</span> w=1.0 ); 111 <a name="l00163"></a>00163 <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#0a772b396750eeeed85d69fa72478b45" title="Logarithm of a determinant.">logdet</a>() <span class="keyword">const</span>; 112 <a name="l00164"></a>00164 <span class="keywordtype">double</span> <a class="code" href="classsqmat.html#90f97cdf9de08ead4f0648419b3aa4ce" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a> (<span class="keyword">const</span> vec &v ); 113 <a name="l00165"></a>00165 <span class="comment">// sqmat& operator -= ( const sqmat & ld2 );</span> 114 <a name="l00166"></a>00166 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6fca246f9eabbdeb8cac03030e826b5e" title="Clearing matrix so that it corresponds to zeros.">clear</a>(); 115 <a name="l00167"></a>00167 <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols</a>() <span class="keyword">const</span>; 116 <a name="l00168"></a>00168 <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">rows</a>() <span class="keyword">const</span>; 117 <a name="l00169"></a>00169 vec <a class="code" href="classsqmat.html#975ddc7e8035d8d4e6cbd52dd99c248c" title="Multiplies square root of $V$ by vector $x$.">sqrt_mult</a> ( <span class="keyword">const</span> vec &v ); 109 118 <a name="l00170"></a>00170 110 <a name="l00171"></a>00171 ldmat& operator += ( <span class="keyword">const</span> ldmat &ldA ); 111 <a name="l00172"></a>00172 ldmat& operator -= ( <span class="keyword">const</span> ldmat &ldA ); 112 <a name="l00173"></a>00173 ldmat& operator *= ( <span class="keywordtype">double</span> x ); 113 <a name="l00174"></a>00174 114 <a name="l00175"></a>00175 <span class="keyword">friend</span> std::ostream &operator<< ( std::ostream &os, ldmat &sq ); 115 <a name="l00176"></a>00176 116 <a name="l00177"></a>00177 <span class="keyword">protected</span>: 117 <a name="l00178"></a>00178 vec D; 118 <a name="l00179"></a>00179 mat L; 119 <a name="l00180"></a>00180 120 <a name="l00181"></a>00181 }; 121 <a name="l00182"></a>00182 119 <a name="l00176"></a>00176 <span class="keyword">virtual</span> <span class="keywordtype">void</span> inv ( ldmat &Inv ); 120 <a name="l00177"></a>00177 121 <a name="l00183"></a>00183 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#60fbbfa9e483b8187c135f787ee53afa" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a> ( <span class="keyword">const</span> mat &C, ldmat &U); 122 122 <a name="l00184"></a>00184 123 <a name="l00185"></a>00185 <span class="keyword">inline</span> ldmat& ldmat::operator += ( <span class="keyword">const</span> ldmat &ldA ) {this-><span class="keyword">add</span> ( ldA );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 124 <a name="l00186"></a>00186 <span class="keyword">inline</span> ldmat& ldmat::operator -= ( <span class="keyword">const</span> ldmat &ldA ) {this-><span class="keyword">add</span> ( ldA,-1.0 );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 125 <a name="l00187"></a>00187 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">ldmat::cols</a>() {<span class="keywordflow">return</span> dim;} 126 <a name="l00188"></a>00188 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">ldmat::rows</a>() {<span class="keywordflow">return</span> dim;} 127 <a name="l00189"></a>00189 128 <a name="l00190"></a>00190 <span class="preprocessor">#endif // DC_H</span> 129 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by 123 <a name="l00190"></a>00190 <span class="keywordtype">void</span> <a class="code" href="classsqmat.html#6909e906da17725b1b80f3cae7cf3325" title="Inplace symmetric multiplication by a SQUARE transpose of matrix $C$, i.e. $V = C&#39;*V*C$...">mult_sym_t</a> ( <span class="keyword">const</span> mat &C, ldmat &U); 124 <a name="l00191"></a>00191 125 <a name="l00192"></a>00192 126 <a name="l00201"></a>00201 <span class="keywordtype">void</span> ldform (<span class="keyword">const</span> mat &A,<span class="keyword">const</span> vec &D0 ); 127 <a name="l00202"></a>00202 128 <a name="l00204"></a>00204 <span class="keywordtype">void</span> setD (<span class="keyword">const</span> vec &nD){D=nD;} 129 <a name="l00205"></a>00205 <span class="keywordtype">void</span> setL (<span class="keyword">const</span> vec &nL){L=nL;} 130 <a name="l00206"></a>00206 131 <a name="l00207"></a>00207 ldmat& operator += ( <span class="keyword">const</span> ldmat &ldA ); 132 <a name="l00208"></a>00208 ldmat& operator -= ( <span class="keyword">const</span> ldmat &ldA ); 133 <a name="l00209"></a>00209 ldmat& operator *= ( <span class="keywordtype">double</span> x ); 134 <a name="l00210"></a>00210 135 <a name="l00211"></a>00211 <span class="keyword">friend</span> std::ostream &operator<< ( std::ostream &os, <span class="keyword">const</span> ldmat &sq ); 136 <a name="l00212"></a>00212 137 <a name="l00213"></a>00213 138 <a name="l00214"></a>00214 <span class="keyword">protected</span>: 139 <a name="l00215"></a>00215 vec D; 140 <a name="l00216"></a>00216 mat L; 141 <a name="l00217"></a>00217 142 <a name="l00218"></a>00218 }; 143 <a name="l00219"></a>00219 144 <a name="l00221"></a>00221 145 <a name="l00222"></a>00222 <span class="keyword">inline</span> ldmat& ldmat::operator += ( <span class="keyword">const</span> ldmat &ldA ) {this-><span class="keyword">add</span> ( ldA );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 146 <a name="l00223"></a>00223 <span class="keyword">inline</span> ldmat& ldmat::operator -= ( <span class="keyword">const</span> ldmat &ldA ) {this-><span class="keyword">add</span> ( ldA,-1.0 );<span class="keywordflow">return</span> *<span class="keyword">this</span>;} 147 <a name="l00224"></a>00224 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">ldmat::cols</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> dim;} 148 <a name="l00225"></a>00225 <span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="classsqmat.html#071e80ced9cc3b8cbb360fa7462eb646" title="Reimplementing common functions of mat: cols().">ldmat::rows</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> dim;} 149 <a name="l00226"></a>00226 150 <a name="l00227"></a>00227 <span class="preprocessor">#endif // DC_H</span> 151 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 130 152 <a href="http://www.doxygen.org/index.html"> 131 153 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libDC_8h.html ¶
r28 r32 33 33 <p><center><img src="libDC_8h__dep__incl.png" border="0" usemap="#work/mixpp/bdm/math/libDC.hdep_map" alt=""></center> 34 34 <map name="work/mixpp/bdm/math/libDC.hdep_map"> 35 <area shape="rect" href="lib KF_8h.html" title="Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="5,84,219,111"><area shape="rect" href="libPF_8h.html" title="Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="243,84,456,111"><area shape="rect" href="libEF_8h.html" title="Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="480,84,683,111"></map>35 <area shape="rect" href="libEF_8h.html" title="Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="109,84,312,111"><area shape="rect" href="libPF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="243,161,456,188"><area shape="rect" href="libKF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="5,161,219,188"></map> 36 36 </div> 37 37 … … 54 54 <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 55 55 ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 56 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:392008 for mixpp by 56 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 57 57 <a href="http://www.doxygen.org/index.html"> 58 58 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libDC_8h__dep__incl.map ¶
r23 r32 1 <area shape="rect" href="$lib KF_8h.html" title="Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="5,84,219,111">2 <area shape="rect" href="$libPF_8h.html" title=" Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="243,84,456,111">3 <area shape="rect" href="$lib EF_8h.html" title="Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="480,84,683,111">1 <area shape="rect" href="$libEF_8h.html" title="Matrices in decomposed forms (LDL', LU, UDU', etc)." alt="" coords="109,84,312,111"> 2 <area shape="rect" href="$libPF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="243,161,456,188"> 3 <area shape="rect" href="$libKF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="5,161,219,188"> -
TabularUnified doc/html/libDC_8h__dep__incl.md5 ¶
r23 r32 1 c66b92351d16bb545936e84544bf9b08 1 af1628bdb61076f77cc978dc7d907f6c -
TabularUnified doc/html/libDS_8h-source.html ¶
r28 r32 42 42 <a name="l00045"></a>00045 43 43 <a name="l00046"></a>00046 <span class="preprocessor">#endif // DS_H</span> 44 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:392008 for mixpp by 44 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 45 45 <a href="http://www.doxygen.org/index.html"> 46 46 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libDS_8h.html ¶
r28 r32 41 41 <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 42 42 ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 43 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 43 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 44 44 <a href="http://www.doxygen.org/index.html"> 45 45 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libEF_8h-source.html ¶
r28 r32 21 21 <a name="l00017"></a>00017 <span class="preprocessor">#include "../math/libDC.h"</span> 22 22 <a name="l00018"></a>00018 <span class="preprocessor">#include "<a class="code" href="libBM_8h.html" title="Bayesian Models (bm) that use Bayes rule to learn from observations.">libBM.h</a>"</span> 23 <a name="l00019"></a>00019 <span class="comment">//#include <std></span> 24 <a name="l00020"></a>00020 25 <a name="l00021"></a>00021 <span class="keyword">using namespace </span>itpp; 26 <a name="l00022"></a>00022 27 <a name="l00028"></a><a class="code" href="classeEF.html">00028</a> <span class="keyword">class </span><a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> : <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 23 <a name="l00019"></a>00019 <span class="preprocessor">#include "../itpp_ext.h"</span> 24 <a name="l00020"></a>00020 <span class="comment">//#include <std></span> 25 <a name="l00021"></a>00021 26 <a name="l00022"></a>00022 <span class="keyword">using namespace </span>itpp; 27 <a name="l00023"></a>00023 28 <a name="l00024"></a>00024 29 <a name="l00026"></a>00026 <span class="keyword">extern</span> Uniform_RNG UniRNG; 30 <a name="l00027"></a>00027 <span class="keyword">extern</span> Normal_RNG NorRNG; 31 <a name="l00028"></a>00028 <span class="keyword">extern</span> <a class="code" href="classitpp_1_1Gamma__RNG.html" title="Gamma distribution.">Gamma_RNG</a> GamRNG; 28 32 <a name="l00029"></a>00029 29 <a name="l00030"></a>00030 <span class="keyword">public</span>: 30 <a name="l00031"></a>00031 <span class="keyword">virtual</span> <span class="keywordtype">void</span> tupdate( <span class="keywordtype">double</span> phi, mat &vbar, <span class="keywordtype">double</span> nubar ) {}; 31 <a name="l00032"></a>00032 <span class="keyword">virtual</span> <span class="keywordtype">void</span> dupdate( mat &v,<span class="keywordtype">double</span> nu=1.0 ) {}; 32 <a name="l00033"></a>00033 }; 33 <a name="l00034"></a>00034 34 <a name="l00035"></a>00035 <span class="keyword">class </span>mEF : <span class="keyword">public</span> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 35 <a name="l00036"></a>00036 36 <a name="l00037"></a>00037 <span class="keyword">public</span>: 33 <a name="l00030"></a>00030 34 <a name="l00037"></a><a class="code" href="classeEF.html">00037</a> <span class="keyword">class </span><a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> : <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 37 35 <a name="l00038"></a>00038 38 <a name="l00039"></a>00039 };39 <a name="l0004 0"></a>0004040 <a name="l0004 6"></a>00046 <span class="keyword">template</span><<span class="keyword">class</span> sq_T>41 <a name="l0004 7"></a><a class="code" href="classenorm.html">00047</a> <span class="keyword">class </span><a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> {42 <a name="l0004 8"></a>00048 <span class="keywordtype">int</span> dim;43 <a name="l0004 9"></a>00049 vec mu;44 <a name="l000 50"></a>00050 sq_T R;45 <a name="l000 51"></a>00051 <span class="keyword">public</span>:46 <a name="l000 52"></a>00052 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a>( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv, vec &mu, sq_T &R );47 <a name="l000 53"></a>00053 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a>();48 <a name="l0005 5"></a>00055 <span class="keywordtype">void</span> <a class="code" href="classenorm.html#2a1a522504c7788dfd7fb733157ee39e" title="tupdate used in KF">tupdate</a>( <span class="keywordtype">double</span> phi, mat &vbar, <span class="keywordtype">double</span> nubar );49 <a name="l0005 6"></a>00056 <span class="keywordtype">void</span> <a class="code" href="classenorm.html#d1b0faf61260de09cf63bf823add5b32" title="dupdate used in KF">dupdate</a>( mat &v,<span class="keywordtype">double</span> nu=1.0 );50 <a name="l0005 8"></a>00058 <span class="keywordtype">void</span> <a class="code" href="classenorm.html#2a1a522504c7788dfd7fb733157ee39e" title="tupdate used in KF">tupdate</a>();51 <a name="l000 60"></a>00060 <span class="keywordtype">double</span> <a class="code" href="classenorm.html#d1b0faf61260de09cf63bf823add5b32" title="dupdate used in KF">dupdate</a>();52 <a name="l000 61"></a>0006153 <a name="l000 62"></a>00062 vec <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">sample</a>();54 <a name="l0006 3"></a>00063 mat <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">sample</a>(<span class="keywordtype">int</span> N);55 <a name="l0006 4"></a>00064 <span class="keywordtype">double</span> <a class="code" href="classenorm.html#93107f05a8e9b34b64853767200121a4" title="Compute probability of argument val.">eval</a>( <span class="keyword">const</span> vec &val );56 <a name="l0006 5"></a>00065 Normal_RNG RNG;57 <a name="l0006 6"></a>00066 };58 <a name="l0006 7"></a>0006759 <a name="l000 71"></a>00071 <span class="keyword">template</span><<span class="keyword">class</span> sq_T>60 <a name="l0007 2"></a>00072 <span class="keyword">class </span>mlnorm : <span class="keyword">public</span> mEF {61 <a name="l0007 3"></a>00073 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T></a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>;62 <a name="l00074"></a> 00074 mat A;36 <a name="l00039"></a>00039 <span class="keyword">public</span>: 37 <a name="l00041"></a><a class="code" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e">00041</a> <a class="code" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e" title="default constructor">eEF</a>() :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>() {}; 38 <a name="l00042"></a>00042 39 <a name="l00043"></a>00043 <a class="code" href="classeEF.html#702e24158366430bc24d57c7f64e1e9e" title="default constructor">eEF</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ) :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv ) {}; 40 <a name="l00044"></a>00044 41 <a name="l00045"></a>00045 <span class="keyword">virtual</span> <span class="keywordtype">void</span> tupdate ( <span class="keywordtype">double</span> phi, mat &vbar, <span class="keywordtype">double</span> nubar ) {}; 42 <a name="l00046"></a>00046 43 <a name="l00047"></a>00047 <span class="keyword">virtual</span> <span class="keywordtype">void</span> dupdate ( mat &v,<span class="keywordtype">double</span> nu=1.0 ) {}; 44 <a name="l00048"></a>00048 }; 45 <a name="l00049"></a>00049 46 <a name="l00050"></a>00050 <span class="keyword">class </span>mEF : <span class="keyword">public</span> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> { 47 <a name="l00051"></a>00051 48 <a name="l00052"></a>00052 <span class="keyword">public</span>: 49 <a name="l00053"></a>00053 mEF ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0, <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc0 ) :<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> ( rv0,rvc0 ) {}; 50 <a name="l00054"></a>00054 }; 51 <a name="l00055"></a>00055 52 <a name="l00061"></a>00061 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 53 <a name="l00062"></a>00062 54 <a name="l00063"></a><a class="code" href="classenorm.html">00063</a> <span class="keyword">class </span><a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> { 55 <a name="l00064"></a>00064 <span class="keyword">protected</span>: 56 <a name="l00066"></a><a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20">00066</a> vec <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>; 57 <a name="l00068"></a><a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1">00068</a> sq_T <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>; 58 <a name="l00070"></a><a class="code" href="classenorm.html#82f39ac49911d7097f4bfe385deba355">00070</a> sq_T <a class="code" href="classenorm.html#82f39ac49911d7097f4bfe385deba355" title="Cache: _iR = inv(R);.">_iR</a>; 59 <a name="l00072"></a><a class="code" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1">00072</a> <span class="keywordtype">bool</span> <a class="code" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1" title="indicator if _iR is chached">cached</a>; 60 <a name="l00074"></a><a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e">00074</a> <span class="keywordtype">int</span> <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>; 63 61 <a name="l00075"></a>00075 <span class="keyword">public</span>: 64 <a name="l00077"></a>00077 mlnorm( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc, mat &A, sq_T &R ); 65 <a name="l00079"></a>00079 vec samplecond( vec &cond, <span class="keywordtype">double</span> &lik ); 66 <a name="l00080"></a>00080 mat samplecond( vec &cond, vec &lik, <span class="keywordtype">int</span> n ); 67 <a name="l00081"></a>00081 <span class="keywordtype">void</span> condition( vec &cond ); 68 <a name="l00082"></a>00082 }; 62 <a name="l00076"></a>00076 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a>() :<a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a>() {}; 63 <a name="l00077"></a>00077 64 <a name="l00078"></a>00078 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ); 65 <a name="l00079"></a>00079 <span class="keywordtype">void</span> set_parameters ( <span class="keyword">const</span> vec &<a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>,<span class="keyword">const</span> sq_T &<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a> ); 66 <a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a" title="tupdate in exponential form (not really handy)">tupdate</a> ( <span class="keywordtype">double</span> phi, mat &vbar, <span class="keywordtype">double</span> nubar ); 67 <a name="l00082"></a>00082 <span class="keywordtype">void</span> dupdate ( mat &v,<span class="keywordtype">double</span> nu=1.0 ); 69 68 <a name="l00083"></a>00083 70 <a name="l00085"></a>00085 71 <a name="l00086"></a>00086 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 72 <a name="l00087"></a>00087 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T>::enorm</a>( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv, vec &mu0, sq_T &R0 ) { 73 <a name="l00088"></a>00088 dim = rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>(); 74 <a name="l00089"></a>00089 mu = mu0; 75 <a name="l00090"></a>00090 R = R0; 76 <a name="l00091"></a>00091 }; 77 <a name="l00092"></a>00092 78 <a name="l00093"></a>00093 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 79 <a name="l00094"></a>00094 <span class="keywordtype">void</span> <a class="code" href="classenorm.html#d1b0faf61260de09cf63bf823add5b32" title="dupdate used in KF">enorm<sq_T>::dupdate</a>( mat &v, <span class="keywordtype">double</span> nu ) { 80 <a name="l00095"></a>00095 <span class="comment">//</span> 81 <a name="l00096"></a>00096 }; 82 <a name="l00097"></a>00097 83 <a name="l00098"></a>00098 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 84 <a name="l00099"></a><a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a">00099</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#2a1a522504c7788dfd7fb733157ee39e" title="tupdate used in KF">enorm<sq_T>::tupdate</a>( <span class="keywordtype">double</span> phi, mat &vbar, <span class="keywordtype">double</span> nubar ) { 85 <a name="l00100"></a>00100 <span class="comment">//</span> 86 <a name="l00101"></a>00101 }; 87 <a name="l00102"></a>00102 88 <a name="l00103"></a>00103 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 89 <a name="l00104"></a><a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">00104</a> vec <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">enorm<sq_T>::sample</a>() { 90 <a name="l00105"></a>00105 vec x( dim ); 91 <a name="l00106"></a>00106 RNG.sample_vector( dim,x ); 92 <a name="l00107"></a>00107 vec smp = R.sqrt_mult( x ); 93 <a name="l00108"></a>00108 94 <a name="l00109"></a>00109 smp += mu; 95 <a name="l00110"></a>00110 <span class="keywordflow">return</span> smp; 96 <a name="l00111"></a>00111 }; 97 <a name="l00112"></a>00112 98 <a name="l00113"></a>00113 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 99 <a name="l00114"></a>00114 mat <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">enorm<sq_T>::sample</a>( <span class="keywordtype">int</span> N ) { 100 <a name="l00115"></a>00115 mat X( dim,N ); 101 <a name="l00116"></a>00116 vec x( dim ); 102 <a name="l00117"></a>00117 vec pom; 103 <a name="l00118"></a>00118 <span class="keywordtype">int</span> i; 104 <a name="l00119"></a>00119 <span class="keywordflow">for</span> ( i=0;i<N;i++ ) { 105 <a name="l00120"></a>00120 RNG.sample_vector( dim,x ); 106 <a name="l00121"></a>00121 pom = R.sqrt_mult( x ); 107 <a name="l00122"></a>00122 pom +=mu; 108 <a name="l00123"></a>00123 X.set_col( i, pom); 109 <a name="l00124"></a>00124 } 110 <a name="l00125"></a>00125 <span class="keywordflow">return</span> X; 111 <a name="l00126"></a>00126 }; 112 <a name="l00127"></a>00127 113 <a name="l00128"></a>00128 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 114 <a name="l00129"></a><a class="code" href="classenorm.html#93107f05a8e9b34b64853767200121a4">00129</a> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#93107f05a8e9b34b64853767200121a4" title="Compute probability of argument val.">enorm<sq_T>::eval</a>( <span class="keyword">const</span> vec &val ) { 115 <a name="l00130"></a>00130 <span class="comment">//</span> 116 <a name="l00131"></a>00131 }; 117 <a name="l00132"></a>00132 118 <a name="l00133"></a>00133 119 <a name="l00134"></a>00134 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 120 <a name="l00135"></a>00135 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T>::enorm</a>() {}; 121 <a name="l00136"></a>00136 122 <a name="l00137"></a>00137 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 123 <a name="l00138"></a>00138 mlnorm<sq_T>::mlnorm( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc, mat &A, sq_T &R ) { 124 <a name="l00139"></a>00139 <span class="keywordtype">int</span> dim = rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>(); 125 <a name="l00140"></a>00140 vec mu( dim ); 126 <a name="l00141"></a>00141 127 <a name="l00142"></a>00142 <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> = <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T></a>( rv,mu,R ); 128 <a name="l00143"></a>00143 } 129 <a name="l00144"></a>00144 130 <a name="l00145"></a>00145 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 131 <a name="l00146"></a>00146 vec mlnorm<sq_T>::samplecond( vec &cond, <span class="keywordtype">double</span> &lik ) { 132 <a name="l00147"></a>00147 this->condition( cond ); 133 <a name="l00148"></a>00148 vec smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample(); 134 <a name="l00149"></a>00149 lik = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval( smp ); 135 <a name="l00150"></a>00150 <span class="keywordflow">return</span> smp; 136 <a name="l00151"></a>00151 } 137 <a name="l00152"></a>00152 138 <a name="l00153"></a>00153 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 139 <a name="l00154"></a>00154 mat mlnorm<sq_T>::samplecond( vec &cond, vec &lik, <span class="keywordtype">int</span> n ) { 140 <a name="l00155"></a>00155 <span class="keywordtype">int</span> i; 141 <a name="l00156"></a>00156 <span class="keywordtype">int</span> dim = rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>(); 142 <a name="l00157"></a>00157 mat Smp( dim,n ); 143 <a name="l00158"></a>00158 vec smp( dim ); 144 <a name="l00159"></a>00159 this->condition( cond ); 145 <a name="l00160"></a>00160 <span class="keywordflow">for</span> ( i=0; i<dim; i++ ) { 146 <a name="l00161"></a>00161 smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample(); 147 <a name="l00162"></a>00162 lik( i ) = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval( smp ); 148 <a name="l00163"></a>00163 Smp.set_col( i ,smp ); 149 <a name="l00164"></a>00164 } 150 <a name="l00165"></a>00165 <span class="keywordflow">return</span> Smp; 151 <a name="l00166"></a>00166 } 152 <a name="l00167"></a>00167 153 <a name="l00168"></a>00168 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 154 <a name="l00169"></a>00169 <span class="keywordtype">void</span> mlnorm<sq_T>::condition( vec &cond ) { 155 <a name="l00170"></a>00170 <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.mu = A*cond; 156 <a name="l00171"></a>00171 <span class="comment">//R is already assigned;</span> 157 <a name="l00172"></a>00172 } 158 <a name="l00173"></a>00173 159 <a name="l00174"></a>00174 <span class="preprocessor">#endif //EF_H</span> 160 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by 69 <a name="l00084"></a>00084 vec <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">sample</a>(); 70 <a name="l00085"></a>00085 mat <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">sample</a> ( <span class="keywordtype">int</span> N ); 71 <a name="l00086"></a>00086 <span class="keywordtype">double</span> <a class="code" href="classenorm.html#93107f05a8e9b34b64853767200121a4" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &val ); 72 <a name="l00087"></a>00087 <span class="keywordtype">double</span> <a class="code" href="classenorm.html#9517594915e897584eaebbb057ed8881" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &val ); 73 <a name="l00088"></a><a class="code" href="classenorm.html#191c1220c3ddd0c5f54e78f19b57ebd5">00088</a> vec <a class="code" href="classenorm.html#191c1220c3ddd0c5f54e78f19b57ebd5" title="return expected value">mean</a>(){<span class="keywordflow">return</span> <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;} 74 <a name="l00089"></a>00089 75 <a name="l00090"></a>00090 <span class="comment">//Access methods</span> 76 <a name="l00092"></a><a class="code" href="classenorm.html#3be0cb541ec9b88e5aa3f60307bbc753">00092</a> <span class="comment"></span> vec* <a class="code" href="classenorm.html#3be0cb541ec9b88e5aa3f60307bbc753" title="returns a pointer to the internal mean value. Use with Care!">_mu</a>() {<span class="keywordflow">return</span> &<a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>;} 77 <a name="l00093"></a>00093 78 <a name="l00095"></a><a class="code" href="classenorm.html#8725c534863c4fc2bddef0edfb95a740">00095</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#8725c534863c4fc2bddef0edfb95a740" title="returns pointers to the internal variance and its inverse. Use with Care!">_R</a> ( sq_T* &pR, sq_T* &piR ) { 79 <a name="l00096"></a>00096 pR=&<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>; 80 <a name="l00097"></a>00097 piR=&<a class="code" href="classenorm.html#82f39ac49911d7097f4bfe385deba355" title="Cache: _iR = inv(R);.">_iR</a>; 81 <a name="l00098"></a>00098 } 82 <a name="l00099"></a>00099 83 <a name="l00101"></a><a class="code" href="classenorm.html#c9ca4f2ca42568e40ca146168e7f3247">00101</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#c9ca4f2ca42568e40ca146168e7f3247" title="set cache as inconsistent">_cached</a> ( <span class="keywordtype">bool</span> what ) {<a class="code" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1" title="indicator if _iR is chached">cached</a>=what;} 84 <a name="l00102"></a>00102 }; 85 <a name="l00103"></a>00103 86 <a name="l00113"></a><a class="code" href="classegamma.html">00113</a> <span class="keyword">class </span><a class="code" href="classegamma.html" title="Gamma posterior density.">egamma</a> : <span class="keyword">public</span> <a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> { 87 <a name="l00114"></a>00114 <span class="keyword">protected</span>: 88 <a name="l00115"></a>00115 vec alpha; 89 <a name="l00116"></a>00116 vec beta; 90 <a name="l00117"></a>00117 <span class="keyword">public</span> : 91 <a name="l00119"></a><a class="code" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1">00119</a> <a class="code" href="classegamma.html#4b1d34f3b244ea51a58ec10c468788c1" title="Default constructor.">egamma</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ) :<a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a> ( rv ) {}; 92 <a name="l00121"></a><a class="code" href="classegamma.html#8e348b89be82b70471fe8c5630f61339">00121</a> <span class="keywordtype">void</span> <a class="code" href="classegamma.html#8e348b89be82b70471fe8c5630f61339" title="Sets parameters.">set_parameters</a> ( <span class="keyword">const</span> vec &a, <span class="keyword">const</span> vec &b ) {alpha=a,beta=b;}; 93 <a name="l00122"></a>00122 vec <a class="code" href="classegamma.html#0a2186a586432c2c3f22d09c5341890f" title="Returns the required moment of the epdf.">sample</a>(); 94 <a name="l00123"></a>00123 mat <a class="code" href="classegamma.html#0a2186a586432c2c3f22d09c5341890f" title="Returns the required moment of the epdf.">sample</a> ( <span class="keywordtype">int</span> N ); 95 <a name="l00124"></a>00124 <span class="keywordtype">double</span> evalpdflog ( <span class="keyword">const</span> vec val ); 96 <a name="l00126"></a><a class="code" href="classegamma.html#44445c56e60b91b377f207f8d5089790">00126</a> <span class="keywordtype">void</span> <a class="code" href="classegamma.html#44445c56e60b91b377f207f8d5089790" title="Returns poiter to alpha and beta. Potentially dengerous: use with care!">_param</a> ( vec* &a, vec* &b ) {a=&alpha;b=&beta;}; 97 <a name="l00127"></a><a class="code" href="classegamma.html#6617890ffa40767fc196876534d4119d">00127</a> vec <a class="code" href="classegamma.html#6617890ffa40767fc196876534d4119d" title="return expected value">mean</a>(){vec pom(alpha); pom/=beta; <span class="keywordflow">return</span> pom;} 98 <a name="l00128"></a>00128 }; 99 <a name="l00129"></a>00129 100 <a name="l00131"></a><a class="code" href="classemix.html">00131</a> <span class="keyword">class </span><a class="code" href="classemix.html" title="Weighted mixture of epdfs with external owned components.">emix</a> : <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 101 <a name="l00132"></a>00132 <span class="keyword">protected</span>: 102 <a name="l00133"></a>00133 <span class="keywordtype">int</span> n; 103 <a name="l00134"></a>00134 vec &w; 104 <a name="l00135"></a>00135 Array<epdf*> Coms; 105 <a name="l00136"></a>00136 <span class="keyword">public</span>: 106 <a name="l00138"></a><a class="code" href="classemix.html#b0ac204af8919c22bce72816ed82019e">00138</a> <a class="code" href="classemix.html#b0ac204af8919c22bce72816ed82019e" title="Default constructor.">emix</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv, vec &w0): <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>(rv), n(w0.length()), w(w0), Coms(n) {}; 107 <a name="l00139"></a>00139 <span class="keywordtype">void</span> set_parameters( <span class="keywordtype">int</span> &i, <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* ep){Coms(i)=ep;} 108 <a name="l00140"></a><a class="code" href="classemix.html#dcb3f927bf061eac6229850158ca1558">00140</a> vec <a class="code" href="classemix.html#dcb3f927bf061eac6229850158ca1558" title="return expected value">mean</a>(){vec pom; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i=0;i<n;i++){pom+=Coms(i)->mean()*w(i);} <span class="keywordflow">return</span> pom;}; 109 <a name="l00141"></a><a class="code" href="classemix.html#3eb9a8e12ce1c5c8a3ddb245354b6941">00141</a> vec <a class="code" href="classemix.html#3eb9a8e12ce1c5c8a3ddb245354b6941" title="Returns the required moment of the epdf.">sample</a>() {it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0;} 110 <a name="l00142"></a>00142 }; 111 <a name="l00143"></a>00143 112 <a name="l00145"></a>00145 113 <a name="l00146"></a><a class="code" href="classeuni.html">00146</a> <span class="keyword">class </span><a class="code" href="classeuni.html" title="Uniform distributed density on a rectangular support.">euni</a>: <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 114 <a name="l00147"></a>00147 <span class="keyword">protected</span>: 115 <a name="l00149"></a><a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1">00149</a> vec <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>; 116 <a name="l00151"></a><a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231">00151</a> vec <a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a>; 117 <a name="l00153"></a><a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4">00153</a> vec <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a>; 118 <a name="l00155"></a><a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda">00155</a> <span class="keywordtype">double</span> <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a>,lnk; 119 <a name="l00156"></a>00156 <span class="keyword">public</span>: 120 <a name="l00157"></a>00157 <a class="code" href="classeuni.html" title="Uniform distributed density on a rectangular support.">euni</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rv ) :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv ) {} 121 <a name="l00158"></a><a class="code" href="classeuni.html#95f29237feb32fcadf570a181d5a0918">00158</a> <span class="keywordtype">double</span> <a class="code" href="classeuni.html#95f29237feb32fcadf570a181d5a0918" title="Compute probability of argument val.">eval</a> ( <span class="keyword">const</span> vec &val ) {<span class="keywordflow">return</span> <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a>;} 122 <a name="l00159"></a><a class="code" href="classeuni.html#830fca2ffb6786530529c57eabc81666">00159</a> <span class="keywordtype">double</span> <a class="code" href="classeuni.html#830fca2ffb6786530529c57eabc81666" title="Compute log-probability of argument val.">evalpdflog</a> ( <span class="keyword">const</span> vec &val ) {<span class="keywordflow">return</span> lnk;} 123 <a name="l00160"></a><a class="code" href="classeuni.html#0f71562e3e919aba823cb7d9d420ad4c">00160</a> vec <a class="code" href="classeuni.html#0f71562e3e919aba823cb7d9d420ad4c" title="Returns the required moment of the epdf.">sample</a>() { 124 <a name="l00161"></a>00161 vec smp ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>() ); UniRNG.sample_vector ( rv.<a class="code" href="classRV.html#f5c7b8bd589eef09ccdf3329a0addea0" title="Return length (number of scalars) of the RV.">count</a>(),smp ); 125 <a name="l00162"></a>00162 <span class="keywordflow">return</span> <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>+<a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a>*smp; 126 <a name="l00163"></a>00163 } 127 <a name="l00164"></a>00164 <span class="keywordtype">void</span> set_parameters ( <span class="keyword">const</span> vec &low0, <span class="keyword">const</span> vec &high0 ) { 128 <a name="l00165"></a>00165 <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> = high0-low0; 129 <a name="l00166"></a>00166 it_assert_debug ( min ( <a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> ) >0.0,<span class="stringliteral">"bad support"</span> ); 130 <a name="l00167"></a>00167 <a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a> = low0; 131 <a name="l00168"></a>00168 <a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a> = high0; 132 <a name="l00169"></a>00169 <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a> = prod ( 1.0/<a class="code" href="classeuni.html#52a6ff4a54010f88a6a19fca605c64a4" title="internal">distance</a> ); 133 <a name="l00170"></a>00170 lnk = log ( <a class="code" href="classeuni.html#63105490e946e43372d6187ad1bafdda" title="normalizing coefficients">nk</a> ); 134 <a name="l00171"></a>00171 } 135 <a name="l00172"></a><a class="code" href="classeuni.html#34a2f2d23158c40b97b44dfe551a1b3d">00172</a> vec <a class="code" href="classeuni.html#34a2f2d23158c40b97b44dfe551a1b3d" title="return expected value">mean</a>(){vec pom=<a class="code" href="classeuni.html#71b6d6b41aeb61a7f76f682b72119231" title="upper bound on support">high</a>; pom-=<a class="code" href="classeuni.html#ef42cd8d7645422048d46c46ec5cdac1" title="lower bound on support">low</a>; pom/=2.0; <span class="keywordflow">return</span> pom;} 136 <a name="l00173"></a>00173 }; 137 <a name="l00174"></a>00174 138 <a name="l00175"></a>00175 139 <a name="l00181"></a>00181 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 140 <a name="l00182"></a><a class="code" href="classmlnorm.html">00182</a> <span class="keyword">class </span><a class="code" href="classmlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm</a> : <span class="keyword">public</span> mEF { 141 <a name="l00183"></a>00183 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T></a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>; 142 <a name="l00184"></a>00184 vec* _mu; <span class="comment">//cached epdf.mu;</span> 143 <a name="l00185"></a>00185 mat A; 144 <a name="l00186"></a>00186 <span class="keyword">public</span>: 145 <a name="l00188"></a>00188 <a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5" title="Constructor.">mlnorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc ); 146 <a name="l00189"></a>00189 <span class="keywordtype">void</span> set_parameters ( <span class="keyword">const</span> mat &A, <span class="keyword">const</span> sq_T &R ); 147 <a name="l00191"></a>00191 vec <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">samplecond</a> ( vec &cond, <span class="keywordtype">double</span> &lik ); 148 <a name="l00193"></a>00193 mat <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">samplecond</a> ( vec &cond, vec &lik, <span class="keywordtype">int</span> n ); 149 <a name="l00194"></a>00194 <span class="keywordtype">void</span> condition ( vec &cond ); 150 <a name="l00195"></a>00195 }; 151 <a name="l00196"></a>00196 152 <a name="l00206"></a><a class="code" href="classmgamma.html">00206</a> <span class="keyword">class </span><a class="code" href="classmgamma.html" title="Gamma random walk.">mgamma</a> : <span class="keyword">public</span> mEF { 153 <a name="l00207"></a>00207 <a class="code" href="classegamma.html" title="Gamma posterior density.">egamma</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>; 154 <a name="l00208"></a>00208 <span class="keywordtype">double</span> k; 155 <a name="l00209"></a>00209 vec* _beta; 156 <a name="l00210"></a>00210 157 <a name="l00211"></a>00211 <span class="keyword">public</span>: 158 <a name="l00213"></a>00213 <a class="code" href="classmgamma.html#af43e61b86900c0398d5c0ffc83b94e6" title="Constructor.">mgamma</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv,<span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc ); 159 <a name="l00214"></a>00214 <span class="keywordtype">void</span> set_parameters ( <span class="keywordtype">double</span> k ); 160 <a name="l00216"></a>00216 vec <a class="code" href="classmgamma.html#9f40dc43885085fad8e3d6652b79e139" title="Generate one sample of the posterior.">samplecond</a> ( vec &cond, <span class="keywordtype">double</span> &lik ); 161 <a name="l00218"></a>00218 mat <a class="code" href="classmgamma.html#9f40dc43885085fad8e3d6652b79e139" title="Generate one sample of the posterior.">samplecond</a> ( vec &cond, vec &lik, <span class="keywordtype">int</span> n ); 162 <a name="l00219"></a>00219 <span class="keywordtype">void</span> condition ( <span class="keyword">const</span> vec &val ) {*_beta=k/val;}; 163 <a name="l00220"></a>00220 }; 164 <a name="l00221"></a>00221 165 <a name="l00223"></a><a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212">00223</a> <span class="keyword">enum</span> <a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212" title="Switch between various resampling methods.">RESAMPLING_METHOD</a> { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 }; 166 <a name="l00229"></a><a class="code" href="classeEmp.html">00229</a> <span class="keyword">class </span><a class="code" href="classeEmp.html" title="Weighted empirical density.">eEmp</a>: <span class="keyword">public</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> { 167 <a name="l00230"></a>00230 <span class="keyword">protected</span> : 168 <a name="l00232"></a><a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd">00232</a> <span class="keywordtype">int</span> <a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a>; 169 <a name="l00233"></a>00233 vec w; 170 <a name="l00234"></a>00234 Array<vec> samples; 171 <a name="l00235"></a>00235 <span class="keyword">public</span>: 172 <a name="l00236"></a>00236 <a class="code" href="classeEmp.html" title="Weighted empirical density.">eEmp</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0 ) :<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv0 ) {}; 173 <a name="l00237"></a>00237 <span class="keywordtype">void</span> set_parameters ( <span class="keyword">const</span> vec &w0, <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* pdf0 ); 174 <a name="l00239"></a><a class="code" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b">00239</a> vec& <a class="code" href="classeEmp.html#31b2bfb73b72486a5c89f2ab850c7a9b" title="Potentially dangerous, use with care.">_w</a>() {<span class="keywordflow">return</span> w;}; 175 <a name="l00240"></a>00240 Array<vec>& _samples() {<span class="keywordflow">return</span> samples;}; 176 <a name="l00242"></a>00242 ivec <a class="code" href="classeEmp.html#77268292fc4465cb73ddbfb1f2932a59" title="Function performs resampling, i.e. removal of low-weight samples and duplication...">resample</a> ( <a class="code" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212" title="Switch between various resampling methods.">RESAMPLING_METHOD</a> method = SYSTEMATIC ); 177 <a name="l00243"></a><a class="code" href="classeEmp.html#c9b44099a400579b88aff9f5afaf9c13">00243</a> vec <a class="code" href="classeEmp.html#c9b44099a400579b88aff9f5afaf9c13" title="Returns the required moment of the epdf.">sample</a>() {it_error ( <span class="stringliteral">"Not implemented"</span> );<span class="keywordflow">return</span> 0;} 178 <a name="l00244"></a><a class="code" href="classeEmp.html#de42454cb65a17fd8662d207dd59aacf">00244</a> vec <a class="code" href="classeEmp.html#de42454cb65a17fd8662d207dd59aacf" title="return expected value">mean</a>(){vec pom; 179 <a name="l00245"></a>00245 <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i=0;i<<a class="code" href="classeEmp.html#8c33034de0e35f03f8bb85d3d67438fd" title="Number of particles.">n</a>;i++){pom+=samples(i)*w(i);} 180 <a name="l00246"></a>00246 <span class="keywordflow">return</span> pom; 181 <a name="l00247"></a>00247 } 182 <a name="l00248"></a>00248 }; 183 <a name="l00249"></a>00249 184 <a name="l00250"></a>00250 185 <a name="l00252"></a>00252 186 <a name="l00253"></a>00253 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 187 <a name="l00254"></a>00254 <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T>::enorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv ) :<a class="code" href="classeEF.html" title="General conjugate exponential family posterior density.">eEF</a>(), mu ( rv.count() ),R ( rv.count() ),_iR ( rv.count() ),cached ( false ),dim ( rv.count() ) {}; 188 <a name="l00255"></a>00255 189 <a name="l00256"></a>00256 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 190 <a name="l00257"></a>00257 <span class="keywordtype">void</span> <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T>::set_parameters</a> ( <span class="keyword">const</span> vec &mu0, <span class="keyword">const</span> sq_T &R0 ) { 191 <a name="l00258"></a>00258 <span class="comment">//Fixme test dimensions of mu0 and R0;</span> 192 <a name="l00259"></a>00259 mu = mu0; 193 <a name="l00260"></a>00260 R = R0; 194 <a name="l00261"></a>00261 <span class="keywordflow">if</span> ( _iR.rows() !=R.rows() ) _iR=R; <span class="comment">// memory allocation!</span> 195 <a name="l00262"></a>00262 R.inv ( _iR ); <span class="comment">//update cache</span> 196 <a name="l00263"></a>00263 cached=<span class="keyword">true</span>; 197 <a name="l00264"></a>00264 }; 198 <a name="l00265"></a>00265 199 <a name="l00266"></a>00266 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 200 <a name="l00267"></a>00267 <span class="keywordtype">void</span> <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T>::dupdate</a> ( mat &v, <span class="keywordtype">double</span> nu ) { 201 <a name="l00268"></a>00268 <span class="comment">//</span> 202 <a name="l00269"></a>00269 }; 203 <a name="l00270"></a>00270 204 <a name="l00271"></a>00271 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 205 <a name="l00272"></a><a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a">00272</a> <span class="keywordtype">void</span> <a class="code" href="classenorm.html#5b5fd142b6b17ea334597960e3fe126a" title="tupdate in exponential form (not really handy)">enorm<sq_T>::tupdate</a> ( <span class="keywordtype">double</span> phi, mat &vbar, <span class="keywordtype">double</span> nubar ) { 206 <a name="l00273"></a>00273 <span class="comment">//</span> 207 <a name="l00274"></a>00274 }; 208 <a name="l00275"></a>00275 209 <a name="l00276"></a>00276 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 210 <a name="l00277"></a><a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023">00277</a> vec <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">enorm<sq_T>::sample</a>() { 211 <a name="l00278"></a>00278 vec x ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a> ); 212 <a name="l00279"></a>00279 NorRNG.sample_vector ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,x ); 213 <a name="l00280"></a>00280 vec smp = <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x ); 214 <a name="l00281"></a>00281 215 <a name="l00282"></a>00282 smp += <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>; 216 <a name="l00283"></a>00283 <span class="keywordflow">return</span> smp; 217 <a name="l00284"></a>00284 }; 218 <a name="l00285"></a>00285 219 <a name="l00286"></a>00286 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 220 <a name="l00287"></a>00287 mat <a class="code" href="classenorm.html#6020bcd89db2c9584bd8871001bd2023" title="Returns the required moment of the epdf.">enorm<sq_T>::sample</a> ( <span class="keywordtype">int</span> N ) { 221 <a name="l00288"></a>00288 mat X ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,N ); 222 <a name="l00289"></a>00289 vec x ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a> ); 223 <a name="l00290"></a>00290 vec pom; 224 <a name="l00291"></a>00291 <span class="keywordtype">int</span> i; 225 <a name="l00292"></a>00292 226 <a name="l00293"></a>00293 <span class="keywordflow">for</span> ( i=0;i<N;i++ ) { 227 <a name="l00294"></a>00294 NorRNG.sample_vector ( <a class="code" href="classenorm.html#6938fc390a19cdaf6ad4503fcbaada4e" title="dimension (redundant from rv.count() for easier coding )">dim</a>,x ); 228 <a name="l00295"></a>00295 pom = <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.sqrt_mult ( x ); 229 <a name="l00296"></a>00296 pom +=<a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>; 230 <a name="l00297"></a>00297 X.set_col ( i, pom ); 231 <a name="l00298"></a>00298 } 232 <a name="l00299"></a>00299 233 <a name="l00300"></a>00300 <span class="keywordflow">return</span> X; 234 <a name="l00301"></a>00301 }; 235 <a name="l00302"></a>00302 236 <a name="l00303"></a>00303 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 237 <a name="l00304"></a><a class="code" href="classenorm.html#93107f05a8e9b34b64853767200121a4">00304</a> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#93107f05a8e9b34b64853767200121a4" title="Compute probability of argument val.">enorm<sq_T>::eval</a> ( <span class="keyword">const</span> vec &val ) { 238 <a name="l00305"></a>00305 <span class="keywordtype">double</span> pdfl,e; 239 <a name="l00306"></a>00306 pdfl = <a class="code" href="classenorm.html#9517594915e897584eaebbb057ed8881" title="Compute log-probability of argument val.">evalpdflog</a> ( val ); 240 <a name="l00307"></a>00307 e = exp ( pdfl ); 241 <a name="l00308"></a>00308 <span class="keywordflow">return</span> e; 242 <a name="l00309"></a>00309 }; 243 <a name="l00310"></a>00310 244 <a name="l00311"></a>00311 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 245 <a name="l00312"></a><a class="code" href="classenorm.html#9517594915e897584eaebbb057ed8881">00312</a> <span class="keywordtype">double</span> <a class="code" href="classenorm.html#9517594915e897584eaebbb057ed8881" title="Compute log-probability of argument val.">enorm<sq_T>::evalpdflog</a> ( <span class="keyword">const</span> vec &val ) { 246 <a name="l00313"></a>00313 <span class="keywordflow">if</span> ( !<a class="code" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1" title="indicator if _iR is chached">cached</a> ) {<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.inv ( <a class="code" href="classenorm.html#82f39ac49911d7097f4bfe385deba355" title="Cache: _iR = inv(R);.">_iR</a> );<a class="code" href="classenorm.html#ae12db77283a96e0f14a3eae93dc3bf1" title="indicator if _iR is chached">cached</a>=<span class="keyword">true</span>;} 247 <a name="l00314"></a>00314 248 <a name="l00315"></a>00315 <span class="keywordflow">return</span> -0.5* ( <a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.cols() *0.79817986835811504957 +<a class="code" href="classenorm.html#4ccc8d8514d644ef1c98d8ab023748a1" title="Covariance matrix in decomposed form.">R</a>.logdet() +<a class="code" href="classenorm.html#82f39ac49911d7097f4bfe385deba355" title="Cache: _iR = inv(R);.">_iR</a>.qform ( <a class="code" href="classenorm.html#71fde0d54bba147e00f612577f95ad20" title="mean value">mu</a>-val ) ); 249 <a name="l00316"></a>00316 }; 250 <a name="l00317"></a>00317 251 <a name="l00318"></a>00318 252 <a name="l00319"></a>00319 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 253 <a name="l00320"></a><a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5">00320</a> <a class="code" href="classmlnorm.html#f927203b3f31171c5c10ffc7caa797f5" title="Constructor.">mlnorm<sq_T>::mlnorm</a> ( <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0,<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rvc0 ) :mEF ( rv0,rvc0 ),<a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a> ( rv ),A ( rv0.count(),rv0.count() ) { 254 <a name="l00321"></a>00321 _mu = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>._mu(); 255 <a name="l00322"></a>00322 } 256 <a name="l00323"></a>00323 257 <a name="l00324"></a>00324 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 258 <a name="l00325"></a>00325 <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm<sq_T>::set_parameters</a> ( <span class="keyword">const</span> mat &A0, <span class="keyword">const</span> sq_T &R0 ) { 259 <a name="l00326"></a>00326 <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.set_parameters ( zeros ( rv.count() ),R0 ); 260 <a name="l00327"></a>00327 A = A0; 261 <a name="l00328"></a>00328 } 262 <a name="l00329"></a>00329 263 <a name="l00330"></a>00330 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 264 <a name="l00331"></a><a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18">00331</a> vec <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">mlnorm<sq_T>::samplecond</a> ( vec &cond, <span class="keywordtype">double</span> &lik ) { 265 <a name="l00332"></a>00332 this->condition ( cond ); 266 <a name="l00333"></a>00333 vec smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample(); 267 <a name="l00334"></a>00334 lik = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval ( smp ); 268 <a name="l00335"></a>00335 <span class="keywordflow">return</span> smp; 269 <a name="l00336"></a>00336 } 270 <a name="l00337"></a>00337 271 <a name="l00338"></a>00338 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 272 <a name="l00339"></a><a class="code" href="classmlnorm.html#215fb88cc8b95d64cdefd6849abdd1e8">00339</a> mat <a class="code" href="classmlnorm.html#decf3e3b5c8e0812e5b4dbe94fa2ae18" title="Generate one sample of the posterior.">mlnorm<sq_T>::samplecond</a> ( vec &cond, vec &lik, <span class="keywordtype">int</span> n ) { 273 <a name="l00340"></a>00340 <span class="keywordtype">int</span> i; 274 <a name="l00341"></a>00341 <span class="keywordtype">int</span> dim = rv.count(); 275 <a name="l00342"></a>00342 mat Smp ( dim,n ); 276 <a name="l00343"></a>00343 vec smp ( dim ); 277 <a name="l00344"></a>00344 this->condition ( cond ); 278 <a name="l00345"></a>00345 279 <a name="l00346"></a>00346 <span class="keywordflow">for</span> ( i=0; i<n; i++ ) { 280 <a name="l00347"></a>00347 smp = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.sample(); 281 <a name="l00348"></a>00348 lik ( i ) = <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>.eval ( smp ); 282 <a name="l00349"></a>00349 Smp.set_col ( i ,smp ); 283 <a name="l00350"></a>00350 } 284 <a name="l00351"></a>00351 285 <a name="l00352"></a>00352 <span class="keywordflow">return</span> Smp; 286 <a name="l00353"></a>00353 } 287 <a name="l00354"></a>00354 288 <a name="l00355"></a>00355 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 289 <a name="l00356"></a>00356 <span class="keywordtype">void</span> <a class="code" href="classmlnorm.html" title="Normal distributed linear function with linear function of mean value;.">mlnorm<sq_T>::condition</a> ( vec &cond ) { 290 <a name="l00357"></a>00357 *_mu = A*cond; 291 <a name="l00358"></a>00358 <span class="comment">//R is already assigned;</span> 292 <a name="l00359"></a>00359 } 293 <a name="l00360"></a>00360 294 <a name="l00362"></a>00362 295 <a name="l00363"></a>00363 296 <a name="l00364"></a>00364 <span class="preprocessor">#endif //EF_H</span> 297 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 161 298 <a href="http://www.doxygen.org/index.html"> 162 299 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libEF_8h.html ¶
r28 r32 19 19 <code>#include "<a class="el" href="libDC_8h-source.html">../math/libDC.h</a>"</code><br> 20 20 <code>#include "<a class="el" href="libBM_8h-source.html">libBM.h</a>"</code><br> 21 <code>#include "../itpp_ext.h"</code><br> 21 22 22 23 <p> … … 26 27 <p><center><img src="libEF_8h__incl.png" border="0" usemap="#work/mixpp/bdm/stat/libEF.h_map" alt=""></center> 27 28 <map name="work/mixpp/bdm/stat/libEF.h_map"> 28 <area shape="rect" title="Probability distributions for Exponential Family models." alt="" coords="57,161,156,188"><area shape="rect" href="libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="48,84,165,111"><area shape="rect" href="libBM_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="189,84,256,111"></map> 29 <area shape="rect" title="Probability distributions for Exponential Family models." alt="" coords="105,161,204,188"><area shape="rect" href="libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="39,84,156,111"><area shape="rect" href="libBM_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="180,84,247,111"><area shape="rect" href="itpp__ext_8h-source.html" title="Probability distributions for Exponential Family models." alt="" coords="271,84,367,111"></map> 30 </div> 31 32 <p> 33 <div class="dynheader"> 34 This graph shows which files directly or indirectly include this file:</div> 35 <div class="dynsection"> 36 <p><center><img src="libEF_8h__dep__incl.png" border="0" usemap="#work/mixpp/bdm/stat/libEF.hdep_map" alt=""></center> 37 <map name="work/mixpp/bdm/stat/libEF.hdep_map"> 38 <area shape="rect" href="libKF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="5,84,219,111"><area shape="rect" href="libPF_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="243,84,456,111"></map> 29 39 </div> 30 40 … … 41 51 42 52 <tr><td class="mdescLeft"> </td><td class="mdescRight">Gaussian density with positive definite (decomposed) covariance matrix. <a href="classenorm.html#_details">More...</a><br></td></tr> 43 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><b>mlnorm< sq_T ></b></td></tr> 53 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classegamma.html">egamma</a></td></tr> 54 55 <tr><td class="mdescLeft"> </td><td class="mdescRight">Gamma posterior density. <a href="classegamma.html#_details">More...</a><br></td></tr> 56 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classemix.html">emix</a></td></tr> 57 58 <tr><td class="mdescLeft"> </td><td class="mdescRight">Weighted mixture of epdfs with external owned components. <a href="classemix.html#_details">More...</a><br></td></tr> 59 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classeuni.html">euni</a></td></tr> 60 61 <tr><td class="mdescLeft"> </td><td class="mdescRight">Uniform distributed density on a rectangular support. <a href="classeuni.html#_details">More...</a><br></td></tr> 62 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classmlnorm.html">mlnorm< sq_T ></a></td></tr> 63 64 <tr><td class="mdescLeft"> </td><td class="mdescRight">Normal distributed linear function with linear function of mean value;. <a href="classmlnorm.html#_details">More...</a><br></td></tr> 65 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classmgamma.html">mgamma</a></td></tr> 66 67 <tr><td class="mdescLeft"> </td><td class="mdescRight">Gamma random walk. <a href="classmgamma.html#_details">More...</a><br></td></tr> 68 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classeEmp.html">eEmp</a></td></tr> 69 70 <tr><td class="mdescLeft"> </td><td class="mdescRight">Weighted empirical density. <a href="classeEmp.html#_details">More...</a><br></td></tr> 71 <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> 72 <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><a class="el" href="libEF_8h.html#99497a3ff630f761cf6bff7babd23212">RESAMPLING_METHOD</a> { <b>MULTINOMIAL</b> = 0, 73 <b>STRATIFIED</b> = 1, 74 <b>SYSTEMATIC</b> = 3 75 }</td></tr> 76 77 <tr><td class="mdescLeft"> </td><td class="mdescRight">Switch between various resampling methods. <br></td></tr> 78 <tr><td colspan="2"><br><h2>Variables</h2></td></tr> 79 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2ae7dcdfebede774dd1b1f16cad10dd9"></a><!-- doxytag: member="libEF.h::UniRNG" ref="2ae7dcdfebede774dd1b1f16cad10dd9" args="" --> 80 Uniform_RNG </td><td class="memItemRight" valign="bottom"><a class="el" href="libEF_8h.html#2ae7dcdfebede774dd1b1f16cad10dd9">UniRNG</a></td></tr> 81 82 <tr><td class="mdescLeft"> </td><td class="mdescRight">Global Uniform_RNG. <br></td></tr> 83 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="395c5925c8792aef3be4c360e91526c0"></a><!-- doxytag: member="libEF.h::NorRNG" ref="395c5925c8792aef3be4c360e91526c0" args="" --> 84 Normal_RNG </td><td class="memItemRight" valign="bottom"><b>NorRNG</b></td></tr> 85 86 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="884a8348c92a49725b78e2b6ab0bb802"></a><!-- doxytag: member="libEF.h::GamRNG" ref="884a8348c92a49725b78e2b6ab0bb802" args="" --> 87 <a class="el" href="classitpp_1_1Gamma__RNG.html">Gamma_RNG</a> </td><td class="memItemRight" valign="bottom"><b>GamRNG</b></td></tr> 44 88 45 89 </table> … … 49 93 <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 50 94 ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 51 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:40 2008 for mixpp by 95 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 52 96 <a href="http://www.doxygen.org/index.html"> 53 97 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libEF_8h__incl.map ¶
r23 r32 1 <area shape="rect" title="Probability distributions for Exponential Family models." alt="" coords="57,161,156,188"> 2 <area shape="rect" href="$libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="48,84,165,111"> 3 <area shape="rect" href="$libBM_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="189,84,256,111"> 1 <area shape="rect" title="Probability distributions for Exponential Family models." alt="" coords="105,161,204,188"> 2 <area shape="rect" href="$libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="39,84,156,111"> 3 <area shape="rect" href="$libBM_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="180,84,247,111"> 4 <area shape="rect" href="$itpp__ext_8h-source.html" title="Probability distributions for Exponential Family models." alt="" coords="271,84,367,111"> -
TabularUnified doc/html/libEF_8h__incl.md5 ¶
r23 r32 1 c1a5815749bd100c7f3b158f97453358 1 ffbb543ddc54eeeeed9c27c6bb6e909f -
TabularUnified doc/html/libFN_8h-source.html ¶
r28 r32 103 103 <a name="l00109"></a>00109 } 104 104 <a name="l00110"></a>00110 }; 105 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:392008 for mixpp by 105 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 106 106 <a href="http://www.doxygen.org/index.html"> 107 107 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libKF_8h-source.html ¶
r28 r32 20 20 <a name="l00016"></a>00016 <span class="preprocessor">#include <itpp/itbase.h></span> 21 21 <a name="l00017"></a>00017 <span class="preprocessor">#include "../stat/libFN.h"</span> 22 <a name="l00018"></a>00018 <span class="preprocessor">#include "../ math/libDC.h"</span>22 <a name="l00018"></a>00018 <span class="preprocessor">#include "../stat/libEF.h"</span> 23 23 <a name="l00019"></a>00019 24 24 <a name="l00020"></a>00020 25 25 <a name="l00021"></a>00021 <span class="keyword">using namespace </span>itpp; 26 26 <a name="l00022"></a>00022 27 <a name="l00026"></a><a class="code" href="classKalmanFull.html">00026</a> <span class="keyword">class </span><a class="code" href="classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted...">KalmanFull</a> : <span class="keyword">public</span> <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>{27 <a name="l00026"></a><a class="code" href="classKalmanFull.html">00026</a> <span class="keyword">class </span><a class="code" href="classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted...">KalmanFull</a> { 28 28 <a name="l00027"></a>00027 <span class="keywordtype">int</span> dimx, dimy, dimu; 29 29 <a name="l00028"></a>00028 mat A, B, C, D, R, Q; … … 38 38 <a name="l00039"></a>00039 <span class="keyword">public</span>: 39 39 <a name="l00041"></a>00041 <a class="code" href="classKalmanFull.html#7197ab6e7380790006394eabd3b97043" title="Full constructor.">KalmanFull</a> ( mat A, mat B, mat C, mat D, mat R, mat Q, mat P0, vec mu0); 40 <a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="classKalmanFull.html# 048b13739b94c331cda08249b278552b" title="Here dt = [yt;ut] of appropriate dimensions.">bayes</a>(<span class="keyword">const</span> vec &dt, <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>=<span class="keyword">true</span>);40 <a name="l00043"></a>00043 <span class="keywordtype">void</span> <a class="code" href="classKalmanFull.html#13a041cd98ff157703766be275a657bb" title="Here dt = [yt;ut] of appropriate dimensions.">bayes</a>(<span class="keyword">const</span> vec &dt); 41 41 <a name="l00044"></a>00044 42 42 <a name="l00045"></a>00045 <span class="keyword">friend</span> std::ostream &operator<< ( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted...">KalmanFull</a> &kf ); … … 48 48 <a name="l00054"></a><a class="code" href="classKalman.html">00054</a> <span class="keyword">class </span><a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> : <span class="keyword">public</span> <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 49 49 <a name="l00055"></a>00055 <span class="keyword">protected</span>: 50 <a name="l00056"></a>00056 <span class="keywordtype">int</span> dimx, dimy, dimu; 51 <a name="l00057"></a>00057 mat A, B, C, D; 52 <a name="l00058"></a>00058 sq_T R, Q; 53 <a name="l00059"></a>00059 54 <a name="l00060"></a>00060 <span class="comment">//cache</span> 55 <a name="l00061"></a>00061 mat _K; 56 <a name="l00062"></a>00062 vec _yp; 57 <a name="l00063"></a>00063 sq_T _Ry,_iRy; 58 <a name="l00064"></a>00064 <span class="keyword">public</span>: 59 <a name="l00065"></a>00065 <span class="comment">//posterior </span> 60 <a name="l00067"></a><a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed">00067</a> <span class="comment"></span> vec <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>; 61 <a name="l00069"></a><a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3">00069</a> sq_T <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>; 62 <a name="l00070"></a>00070 63 <a name="l00071"></a>00071 <span class="keyword">public</span>: 64 <a name="l00073"></a>00073 <a class="code" href="classKalman.html#96958a5ebfa966d892137987f265083a" title="Default constructor.">Kalman</a> (<span class="keywordtype">int</span> dimx, <span class="keywordtype">int</span> dimu, <span class="keywordtype">int</span> dimy); 65 <a name="l00075"></a>00075 <a class="code" href="classKalman.html#96958a5ebfa966d892137987f265083a" title="Default constructor.">Kalman</a> ( mat A0, mat B0, mat C0, mat D0, sq_T R0, sq_T Q0, sq_T P0, vec mu0 ); 66 <a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="classKalman.html#e945d9205ca14acbd83ba80ea6f72b8e" title="Here dt = [yt;ut] of appropriate dimensions.">bayes</a>(<span class="keyword">const</span> vec &dt, <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>=<span class="keyword">true</span>); 67 <a name="l00078"></a>00078 68 <a name="l00079"></a>00079 <span class="keyword">friend</span> std::ostream &operator<< ( std::ostream &os, <span class="keyword">const</span> <a class="code" href="classKalmanFull.html" title="Basic Kalman filter with full matrices (education purpose only)! Will be deleted...">KalmanFull</a> &kf ); 69 <a name="l00080"></a>00080 70 <a name="l00081"></a>00081 }; 71 <a name="l00082"></a>00082 72 <a name="l00088"></a>00088 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 73 <a name="l00089"></a><a class="code" href="classEKF.html">00089</a> <span class="keyword">class </span><a class="code" href="classEKF.html" title="Extended Kalman Filter.">EKF</a> : <span class="keyword">public</span> <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a><fsqmat> { 74 <a name="l00091"></a>00091 <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* pfxu; 75 <a name="l00093"></a>00093 <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* phxu; 76 <a name="l00094"></a>00094 <span class="keyword">public</span>: 77 <a name="l00096"></a>00096 <a class="code" href="classEKF.html#003687c6cf2a01be90a00e2c99e3863e" title="Default constructor.">EKF</a> (<a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* pfxu, <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* phxu, sq_T Q0, sq_T R0, vec mu0, mat P0); 78 <a name="l00098"></a>00098 <span class="keywordtype">void</span> <a class="code" href="classEKF.html#fb0a08463f14e5584344ea2df99fe747" title="Here dt = [yt;ut] of appropriate dimensions.">bayes</a>(<span class="keyword">const</span> vec &dt, <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>=<span class="keyword">true</span>); 79 <a name="l00099"></a>00099 }; 80 <a name="l00100"></a>00100 81 <a name="l00102"></a>00102 82 <a name="l00103"></a>00103 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 83 <a name="l00104"></a><a class="code" href="classKalman.html#96958a5ebfa966d892137987f265083a">00104</a> <a class="code" href="classKalman.html#96958a5ebfa966d892137987f265083a" title="Default constructor.">Kalman<sq_T>::Kalman</a>( <span class="keywordtype">int</span> dx, <span class="keywordtype">int</span> du, <span class="keywordtype">int</span> dy): <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>(), dimx(dx),dimy(dy),dimu(du){ 84 <a name="l00105"></a>00105 A = mat(dimx,dimx); 85 <a name="l00106"></a>00106 B = mat(dimx,dimu); 86 <a name="l00107"></a>00107 C = mat(dimy,dimx); 87 <a name="l00108"></a>00108 D = mat(dimy,dimu); 88 <a name="l00109"></a>00109 89 <a name="l00110"></a>00110 <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> = vec(dimx); 90 <a name="l00111"></a>00111 <span class="comment">//TODO Initialize the rest?</span> 91 <a name="l00112"></a>00112 }; 92 <a name="l00113"></a>00113 93 <a name="l00114"></a>00114 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 94 <a name="l00115"></a><a class="code" href="classKalman.html#83118f4bd2ecbc70b03cfd573088ed6f">00115</a> <a class="code" href="classKalman.html#96958a5ebfa966d892137987f265083a" title="Default constructor.">Kalman<sq_T>::Kalman</a>(<span class="keyword">const</span> mat A0,<span class="keyword">const</span> mat B0, <span class="keyword">const</span> mat C0, <span class="keyword">const</span> mat D0, <span class="keyword">const</span> sq_T R0, <span class="keyword">const</span> sq_T Q0, <span class="keyword">const</span> sq_T P0, <span class="keyword">const</span> vec mu0 ): <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>() { 95 <a name="l00116"></a>00116 dimx = A0.rows(); 96 <a name="l00117"></a>00117 dimu = B0.cols(); 97 <a name="l00118"></a>00118 dimy = C0.rows(); 98 <a name="l00119"></a>00119 99 <a name="l00120"></a>00120 it_assert_debug( A0.cols()==dimx, <span class="stringliteral">"Kalman: A is not square"</span> ); 100 <a name="l00121"></a>00121 it_assert_debug( B0.rows()==dimx, <span class="stringliteral">"Kalman: B is not compatible"</span> ); 101 <a name="l00122"></a>00122 it_assert_debug( C0.cols()==dimx, <span class="stringliteral">"Kalman: C is not square"</span> ); 102 <a name="l00123"></a>00123 it_assert_debug(( D0.rows()==dimy ) || ( D0.cols()==dimu ), <span class="stringliteral">"Kalman: D is not compatible"</span> ); 103 <a name="l00124"></a>00124 it_assert_debug(( R0.cols()==dimy ) || ( R0.rows()==dimy ), <span class="stringliteral">"Kalman: R is not compatible"</span> ); 104 <a name="l00125"></a>00125 it_assert_debug(( Q0.cols()==dimx ) || ( Q0.rows()==dimx ), <span class="stringliteral">"Kalman: Q is not compatible"</span> ); 105 <a name="l00126"></a>00126 106 <a name="l00127"></a>00127 A = A0; 107 <a name="l00128"></a>00128 B = B0; 108 <a name="l00129"></a>00129 C = C0; 109 <a name="l00130"></a>00130 D = D0; 110 <a name="l00131"></a>00131 R = R0; 111 <a name="l00132"></a>00132 Q = Q0; 112 <a name="l00133"></a>00133 <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> = mu0; 113 <a name="l00134"></a>00134 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a> = P0; 50 <a name="l00056"></a>00056 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvy; 51 <a name="l00057"></a>00057 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvu; 52 <a name="l00058"></a>00058 <span class="keywordtype">int</span> dimx, dimy, dimu; 53 <a name="l00059"></a>00059 mat A, B, C, D; 54 <a name="l00060"></a>00060 sq_T R, Q; 55 <a name="l00061"></a>00061 56 <a name="l00063"></a><a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424">00063</a> <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T></a> <a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424" title="posterior density on $x_t$">est</a>; 57 <a name="l00065"></a><a class="code" href="classKalman.html#e580ab06483952bd03f2e651763e184f">00065</a> <a class="code" href="classenorm.html" title="Gaussian density with positive definite (decomposed) covariance matrix.">enorm<sq_T></a> <a class="code" href="classKalman.html#e580ab06483952bd03f2e651763e184f" title="preditive density on $y_t$">fy</a>; 58 <a name="l00066"></a>00066 59 <a name="l00067"></a>00067 mat _K; 60 <a name="l00068"></a>00068 <span class="comment">//cache of fy</span> 61 <a name="l00069"></a>00069 vec* _yp; 62 <a name="l00070"></a>00070 sq_T* _Ry,*_iRy; 63 <a name="l00071"></a>00071 <span class="comment">//cache of est</span> 64 <a name="l00072"></a>00072 vec* _mu; 65 <a name="l00073"></a>00073 sq_T* _P, *_iP; 66 <a name="l00074"></a>00074 67 <a name="l00075"></a>00075 <span class="keyword">public</span>: 68 <a name="l00077"></a>00077 <a class="code" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3" title="Default constructor.">Kalman</a> (<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvx0, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvy0, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvu0); 69 <a name="l00079"></a>00079 <a class="code" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3" title="Default constructor.">Kalman</a> (<span class="keyword">const</span> <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman<sq_T></a> &K0); 70 <a name="l00081"></a>00081 <span class="keywordtype">void</span> <a class="code" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a" title="Set parameters with check of relevance.">set_parameters</a> (<span class="keyword">const</span> mat &A0,<span class="keyword">const</span> mat &B0,<span class="keyword">const</span> mat &C0,<span class="keyword">const</span> mat &D0,<span class="keyword">const</span> sq_T &R0,<span class="keyword">const</span> sq_T &Q0); 71 <a name="l00083"></a><a class="code" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0">00083</a> <span class="keywordtype">void</span> <a class="code" href="classKalman.html#80bcf29466d9a9dd2b8f74699807d0c0" title="Set estimate values, used e.g. in initialization.">set_est</a>(<span class="keyword">const</span> vec &mu0, <span class="keyword">const</span> sq_T &P0 ){<a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424" title="posterior density on $x_t$">est</a>.set_parameters(mu0,P0);}; 72 <a name="l00085"></a>00085 <span class="keywordtype">void</span> <a class="code" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c" title="Here dt = [yt;ut] of appropriate dimensions.">bayes</a>(<span class="keyword">const</span> vec &dt); 73 <a name="l00086"></a><a class="code" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4">00086</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classKalman.html#a213c57aef55b2645e550bed81cfc0d4" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>(){<span class="keywordflow">return</span> <a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424" title="posterior density on $x_t$">est</a>;} 74 <a name="l00087"></a>00087 <span class="comment">// friend std::ostream &operator<< ( std::ostream &os, const Kalman<sq_T> &kf );</span> 75 <a name="l00088"></a>00088 76 <a name="l00090"></a>00090 }; 77 <a name="l00091"></a>00091 78 <a name="l00097"></a>00097 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 79 <a name="l00098"></a><a class="code" href="classEKF.html">00098</a> <span class="keyword">class </span><a class="code" href="classEKF.html" title="Extended Kalman Filter.">EKF</a> : <span class="keyword">public</span> <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a><ldmat> { 80 <a name="l00100"></a>00100 <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* pfxu; 81 <a name="l00102"></a>00102 <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* phxu; 82 <a name="l00103"></a>00103 <span class="keyword">public</span>: 83 <a name="l00105"></a>00105 <a class="code" href="classEKF.html#ea4f3254cacf0a92d2a820b1201d049e" title="Default constructor.">EKF</a> (<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvx, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvy, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvu); 84 <a name="l00106"></a>00106 <span class="keywordtype">void</span> set_parameters(<a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* pfxu, <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* phxu, <span class="keyword">const</span> sq_T Q0, <span class="keyword">const</span> sq_T R0); 85 <a name="l00108"></a>00108 <span class="keywordtype">void</span> <a class="code" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7" title="Here dt = [yt;ut] of appropriate dimensions.">bayes</a>(<span class="keyword">const</span> vec &dt); 86 <a name="l00109"></a>00109 }; 87 <a name="l00110"></a>00110 88 <a name="l00114"></a><a class="code" href="classKFcondQR.html">00114</a> <span class="keyword">class </span><a class="code" href="classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q.">KFcondQR</a> : <span class="keyword">public</span> <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a><ldmat>, <span class="keyword">public</span> <a class="code" href="classBMcond.html" title="Conditional Bayesian Filter.">BMcond</a> { 89 <a name="l00115"></a>00115 <span class="comment">//protected:</span> 90 <a name="l00116"></a>00116 <span class="keyword">public</span>: 91 <a name="l00117"></a>00117 <a class="code" href="classKFcondQR.html" title="Kalman Filter with conditional diagonal matrices R and Q.">KFcondQR</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvx, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvy, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvu): <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman<ldmat></a>(rvx, rvy,rvu){}; 92 <a name="l00118"></a>00118 <span class="keywordtype">void</span> <a class="code" href="classKFcondQR.html#c9ecf292a85327aa6309c9fd70ceb606" title="Substitute val for rvc.">condition</a>(<span class="keyword">const</span> vec &RQ); 93 <a name="l00119"></a>00119 }; 94 <a name="l00120"></a>00120 95 <a name="l00122"></a>00122 96 <a name="l00123"></a>00123 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 97 <a name="l00124"></a><a class="code" href="classKalman.html#ce38e31810aea4db45a83ad05eaba009">00124</a> <a class="code" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3" title="Default constructor.">Kalman<sq_T>::Kalman</a>(<span class="keyword">const</span> <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman<sq_T></a> &K0): <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>(K0.rv),rvy(K0.rvy),rvu(K0.rvu), 98 <a name="l00125"></a>00125 dimx(rv.count()), dimy(rvy.count()),dimu(rvu.count()), 99 <a name="l00126"></a>00126 A(dimx,dimx), B(dimx,dimu), C(dimy,dimx), D(dimy,dimu),est(rv), fy(rvy){ 100 <a name="l00127"></a>00127 this-><a class="code" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a" title="Set parameters with check of relevance.">set_parameters</a>(K0.<a class="code" href="classKalman.html#5e02efe86ee91e9c74b93b425fe060b9">A</a>, K0.<a class="code" href="classKalman.html#dc87704284a6c0bca13bf51f4345a50a">B</a>, K0.<a class="code" href="classKalman.html#86a805cd6515872d1132ad0d6eb5dc13">C</a>, K0.<a class="code" href="classKalman.html#d69f774ba3335c970c1c5b1d182f4dd1">D</a>, K0.<a class="code" href="classKalman.html#11d171dc0e0ab111c56a70f98b97b3ec">R</a>, K0.<a class="code" href="classKalman.html#9b69015c800eb93f3ee49da23a6f55d9">Q</a>); 101 <a name="l00128"></a>00128 <span class="comment">//reset copy values in pointers</span> 102 <a name="l00129"></a>00129 *_mu = *K0.<a class="code" href="classKalman.html#d1f669b5b3421a070cc75d77b55ba734">_mu</a>; 103 <a name="l00130"></a>00130 *_P = *K0.<a class="code" href="classKalman.html#b3388218567128a797e69b109138271d">_P</a>; 104 <a name="l00131"></a>00131 *_iP = *K0.<a class="code" href="classKalman.html#b8bb7f870d69993493ba67ce40e7c3e9">_iP</a>; 105 <a name="l00132"></a>00132 *_yp = *K0.<a class="code" href="classKalman.html#5188eb0329f8561f0b357af329769bf8">_yp</a>; 106 <a name="l00133"></a>00133 *_iRy = *K0.<a class="code" href="classKalman.html#fbbdf31365f5a5674099599200ea193b">_iRy</a>; 107 <a name="l00134"></a>00134 *_Ry = *K0.<a class="code" href="classKalman.html#e17dd745daa8a958035a334a56fa4674">_Ry</a>; 114 108 <a name="l00135"></a>00135 115 <a name="l00136"></a>00136 <span class="comment">//Fixme should we assign cache??</span> 116 <a name="l00137"></a>00137 _iRy = eye(dimy); <span class="comment">// needed in inv(_iRy)</span> 117 <a name="l00138"></a>00138 _Ry = eye(dimy); <span class="comment">// needed in inv(_iRy)</span> 118 <a name="l00139"></a>00139 } 119 <a name="l00140"></a>00140 120 <a name="l00141"></a>00141 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 121 <a name="l00142"></a><a class="code" href="classKalman.html#e945d9205ca14acbd83ba80ea6f72b8e">00142</a> <span class="keywordtype">void</span> <a class="code" href="classKalman.html#e945d9205ca14acbd83ba80ea6f72b8e" title="Here dt = [yt;ut] of appropriate dimensions.">Kalman<sq_T>::bayes</a>( <span class="keyword">const</span> vec &dt , <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>) { 122 <a name="l00143"></a>00143 it_assert_debug( dt.length()==( dimy+dimu ),<span class="stringliteral">"KalmanFull::bayes wrong size of dt"</span> ); 123 <a name="l00144"></a>00144 124 <a name="l00145"></a>00145 vec u = dt.get( dimy,dimy+dimu-1 ); 125 <a name="l00146"></a>00146 vec y = dt.get( 0,dimy-1 ); 126 <a name="l00147"></a>00147 <span class="comment">//Time update</span> 127 <a name="l00148"></a>00148 <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> = A*<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> + B*u; 128 <a name="l00149"></a>00149 <span class="comment">//P = A*P*A.transpose() + Q; in sq_T</span> 129 <a name="l00150"></a>00150 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>.mult_sym( A ); 130 <a name="l00151"></a>00151 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>+=Q; 131 <a name="l00152"></a>00152 132 <a name="l00153"></a>00153 <span class="comment">//Data update</span> 133 <a name="l00154"></a>00154 <span class="comment">//_Ry = C*P*C.transpose() + R; in sq_T</span> 134 <a name="l00155"></a>00155 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>.mult_sym( C, _Ry); 135 <a name="l00156"></a>00156 _Ry+=R; 136 <a name="l00157"></a>00157 137 <a name="l00158"></a>00158 mat Pfull = <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>.to_mat(); 138 <a name="l00159"></a>00159 139 <a name="l00160"></a>00160 _Ry.inv( _iRy ); <span class="comment">// result is in _iRy;</span> 140 <a name="l00161"></a>00161 _K = Pfull*C.transpose()*(_iRy.to_mat()); 141 <a name="l00162"></a>00162 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a> -= _K*C*Pfull; <span class="comment">// P = P -KCP;</span> 142 <a name="l00163"></a>00163 _yp = y-C*<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>-D*u; <span class="comment">//y prediction</span> 143 <a name="l00164"></a>00164 <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> += _K*( _yp ); 144 <a name="l00165"></a>00165 145 <a name="l00166"></a>00166 <span class="keywordflow">if</span> (evalll==<span class="keyword">true</span>) { 146 <a name="l00167"></a>00167 <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>+= -0.5*(_Ry.cols()*0.79817986835811504957 \ 147 <a name="l00168"></a>00168 +_Ry.logdet() +_iRy.qform(_yp)); 148 <a name="l00169"></a>00169 } 149 <a name="l00170"></a>00170 }; 150 <a name="l00171"></a>00171 151 <a name="l00172"></a>00172 <span class="comment">//TODO why not const pointer??</span> 152 <a name="l00173"></a>00173 153 <a name="l00174"></a>00174 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 154 <a name="l00175"></a><a class="code" href="classEKF.html#003687c6cf2a01be90a00e2c99e3863e">00175</a> <a class="code" href="classEKF.html#003687c6cf2a01be90a00e2c99e3863e" title="Default constructor.">EKF<sq_T>::EKF</a>( <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* pfxu0, <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* phxu0, sq_T Q0, sq_T R0, vec mu0, mat P0): pfxu(pfxu0), phxu(phxu0), <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a><<a class="code" href="classfsqmat.html" title="Fake sqmat. This class maps sqmat operations to operations on full matrix.">fsqmat</a>>(pfxu0->_dimx(),pfxu0->_dimu(),phxu0->_dimy()) { 155 <a name="l00176"></a>00176 156 <a name="l00177"></a>00177 <span class="comment">//initialize matrices A C, later, these will be only updated!</span> 157 <a name="l00178"></a>00178 pfxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>,zeros(dimu),A,<span class="keyword">true</span>); 158 <a name="l00179"></a>00179 pfxu-><a class="code" href="classdiffbifn.html#1978bafd7909d15c139a08c495c24aa0" title="Evaluates and writes result into A .">dfdu_cond</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>,zeros(dimu),B,<span class="keyword">true</span>); 159 <a name="l00180"></a>00180 phxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>,zeros(dimu),C,<span class="keyword">true</span>); 160 <a name="l00181"></a>00181 phxu-><a class="code" href="classdiffbifn.html#1978bafd7909d15c139a08c495c24aa0" title="Evaluates and writes result into A .">dfdu_cond</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>,zeros(dimu),D,<span class="keyword">true</span>); 161 <a name="l00182"></a>00182 162 <a name="l00183"></a>00183 163 <a name="l00184"></a>00184 R = R0; 164 <a name="l00185"></a>00185 Q = Q0; 165 <a name="l00186"></a>00186 <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> = mu0; 166 <a name="l00187"></a>00187 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a> = P0; 167 <a name="l00188"></a>00188 168 <a name="l00189"></a>00189 <span class="keyword">using</span> std::cout; 169 <a name="l00190"></a>00190 cout<<A<<std::endl; 170 <a name="l00191"></a>00191 cout<<B<<std::endl; 171 <a name="l00192"></a>00192 cout<<C<<std::endl; 172 <a name="l00193"></a>00193 cout<<D<<std::endl; 173 <a name="l00194"></a>00194 174 <a name="l00195"></a>00195 } 175 <a name="l00196"></a>00196 176 <a name="l00197"></a>00197 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 177 <a name="l00198"></a><a class="code" href="classEKF.html#fb0a08463f14e5584344ea2df99fe747">00198</a> <span class="keywordtype">void</span> <a class="code" href="classEKF.html#fb0a08463f14e5584344ea2df99fe747" title="Here dt = [yt;ut] of appropriate dimensions.">EKF<sq_T>::bayes</a>( <span class="keyword">const</span> vec &dt , <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>) { 178 <a name="l00199"></a>00199 it_assert_debug( dt.length()==( dimy+dimu ),<span class="stringliteral">"KalmanFull::bayes wrong size of dt"</span> ); 179 <a name="l00200"></a>00200 180 <a name="l00201"></a>00201 vec u = dt.get( dimy,dimy+dimu-1 ); 181 <a name="l00202"></a>00202 vec y = dt.get( 0,dimy-1 ); 182 <a name="l00203"></a>00203 <span class="comment">//Time update</span> 183 <a name="l00204"></a>00204 <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> = pfxu-><a class="code" href="classdiffbifn.html#ad7673e16aa1a046b131b24c731c4632" title="Evaluates $f(x0,u0)$ (VS: Do we really need common eval? ).">eval</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>, u); 184 <a name="l00205"></a>00205 pfxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>,u,A,<span class="keyword">false</span>); <span class="comment">//update A by a derivative of fx</span> 185 <a name="l00206"></a>00206 186 <a name="l00207"></a>00207 <span class="comment">//P = A*P*A.transpose() + Q; in sq_T</span> 187 <a name="l00208"></a>00208 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>.<a class="code" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a>( A ); 188 <a name="l00209"></a>00209 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>+=Q; 189 <a name="l00210"></a>00210 190 <a name="l00211"></a>00211 <span class="comment">//Data update</span> 191 <a name="l00212"></a>00212 phxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>,u,C,<span class="keyword">false</span>); <span class="comment">//update C by a derivative hx</span> 192 <a name="l00213"></a>00213 <span class="comment">//_Ry = C*P*C.transpose() + R; in sq_T</span> 193 <a name="l00214"></a>00214 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>.<a class="code" href="classfsqmat.html#acc5d2d0a243f1de6d0106065f01f518" title="Inplace symmetric multiplication by a SQUARE matrix $C$, i.e. $V = C*V*C&#39;$.">mult_sym</a>( C, _Ry); 194 <a name="l00215"></a>00215 _Ry+=R; 195 <a name="l00216"></a>00216 196 <a name="l00217"></a>00217 mat Pfull = <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a>.<a class="code" href="classfsqmat.html#cedf4f048309056f4262c930914dfda8" title="Conversion to full matrix.">to_mat</a>(); 197 <a name="l00218"></a>00218 198 <a name="l00219"></a>00219 _Ry.<a class="code" href="classfsqmat.html#9fa853e1ca28f2a1a1c43377e798ecb1" title="Matrix inversion preserving the chosen form.">inv</a>( _iRy ); <span class="comment">// result is in _iRy;</span> 199 <a name="l00220"></a>00220 _K = Pfull*C.transpose()*(_iRy.<a class="code" href="classfsqmat.html#cedf4f048309056f4262c930914dfda8" title="Conversion to full matrix.">to_mat</a>()); 200 <a name="l00221"></a>00221 <a class="code" href="classKalman.html#188cd5ac1c9e496b1a371eb7c57c97d3" title="Mean value of the posterior density.">P</a> -= _K*C*Pfull; <span class="comment">// P = P -KCP;</span> 201 <a name="l00222"></a>00222 _yp = y-phxu-><a class="code" href="classdiffbifn.html#ad7673e16aa1a046b131b24c731c4632" title="Evaluates $f(x0,u0)$ (VS: Do we really need common eval? ).">eval</a>(<a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a>,u); <span class="comment">//y prediction</span> 202 <a name="l00223"></a>00223 <a class="code" href="classKalman.html#3063a3f58a74cea672ae889971012eed" title="Mean value of the posterior density.">mu</a> += _K*( _yp ); 203 <a name="l00224"></a>00224 204 <a name="l00225"></a>00225 <span class="keywordflow">if</span> (evalll==<span class="keyword">true</span>) { 205 <a name="l00226"></a>00226 <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>+= -0.5*(_Ry.<a class="code" href="classsqmat.html#ecc2e2540f95a04f4449842588170f5b" title="Reimplementing common functions of mat: cols().">cols</a>()*0.79817986835811504957 \ 206 <a name="l00227"></a>00227 +_Ry.<a class="code" href="classfsqmat.html#bf212272ec195ad2706e2bf4d8e7c9b3" title="Logarithm of a determinant.">logdet</a>() +_iRy.<a class="code" href="classfsqmat.html#6d047b9f7a27dfc093303a13cc9b1fba" title="Evaluates quadratic form $x= v&#39;*V*v$;.">qform</a>(_yp)); 207 <a name="l00228"></a>00228 } 208 <a name="l00229"></a>00229 }; 209 <a name="l00230"></a>00230 210 <a name="l00231"></a>00231 211 <a name="l00232"></a>00232 <span class="preprocessor">#endif // KF_H</span> 212 <a name="l00233"></a>00233 <span class="preprocessor"></span> 213 <a name="l00234"></a>00234 214 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by 109 <a name="l00136"></a>00136 } 110 <a name="l00137"></a>00137 111 <a name="l00138"></a>00138 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 112 <a name="l00139"></a><a class="code" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3">00139</a> <a class="code" href="classKalman.html#3d56b0a97b8c1e25fdd3b10eef3c2ad3" title="Default constructor.">Kalman<sq_T>::Kalman</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvx, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvy0, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvu0): <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>(rvx),rvy(rvy0),rvu(rvu0), 113 <a name="l00140"></a>00140 dimx(rvx.count()), dimy(rvy.count()),dimu(rvu.count()), 114 <a name="l00141"></a>00141 A(dimx,dimx), B(dimx,dimu), C(dimy,dimx), D(dimy,dimu),<a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424" title="posterior density on $x_t$">est</a>(rvx), <a class="code" href="classKalman.html#e580ab06483952bd03f2e651763e184f" title="preditive density on $y_t$">fy</a>(rvy){ 115 <a name="l00142"></a>00142 <span class="comment">//assign cache</span> 116 <a name="l00143"></a>00143 <span class="comment">//est</span> 117 <a name="l00144"></a>00144 _mu = <a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424" title="posterior density on $x_t$">est</a>._mu(); 118 <a name="l00145"></a>00145 <a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424" title="posterior density on $x_t$">est</a>._R(_P,_iP); 119 <a name="l00146"></a>00146 120 <a name="l00147"></a>00147 <span class="comment">//fy</span> 121 <a name="l00148"></a>00148 _yp = <a class="code" href="classKalman.html#e580ab06483952bd03f2e651763e184f" title="preditive density on $y_t$">fy</a>._mu(); 122 <a name="l00149"></a>00149 <a class="code" href="classKalman.html#e580ab06483952bd03f2e651763e184f" title="preditive density on $y_t$">fy</a>._R(_Ry,_iRy); 123 <a name="l00150"></a>00150 }; 124 <a name="l00151"></a>00151 125 <a name="l00152"></a>00152 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 126 <a name="l00153"></a><a class="code" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a">00153</a> <span class="keywordtype">void</span> <a class="code" href="classKalman.html#239b28a0380946f5749b2f8d2807f93a" title="Set parameters with check of relevance.">Kalman<sq_T>::set_parameters</a>(<span class="keyword">const</span> mat &A0,<span class="keyword">const</span> mat &B0, <span class="keyword">const</span> mat &C0, <span class="keyword">const</span> mat &D0, <span class="keyword">const</span> sq_T &R0, <span class="keyword">const</span> sq_T &Q0) { 127 <a name="l00154"></a>00154 it_assert_debug( A0.cols()==dimx, <span class="stringliteral">"Kalman: A is not square"</span> ); 128 <a name="l00155"></a>00155 it_assert_debug( B0.rows()==dimx, <span class="stringliteral">"Kalman: B is not compatible"</span> ); 129 <a name="l00156"></a>00156 it_assert_debug( C0.cols()==dimx, <span class="stringliteral">"Kalman: C is not square"</span> ); 130 <a name="l00157"></a>00157 it_assert_debug(( D0.rows()==dimy ) || ( D0.cols()==dimu ), <span class="stringliteral">"Kalman: D is not compatible"</span> ); 131 <a name="l00158"></a>00158 it_assert_debug(( R0.cols()==dimy ) || ( R0.rows()==dimy ), <span class="stringliteral">"Kalman: R is not compatible"</span> ); 132 <a name="l00159"></a>00159 it_assert_debug(( Q0.cols()==dimx ) || ( Q0.rows()==dimx ), <span class="stringliteral">"Kalman: Q is not compatible"</span> ); 133 <a name="l00160"></a>00160 134 <a name="l00161"></a>00161 A = A0; 135 <a name="l00162"></a>00162 B = B0; 136 <a name="l00163"></a>00163 C = C0; 137 <a name="l00164"></a>00164 D = D0; 138 <a name="l00165"></a>00165 R = R0; 139 <a name="l00166"></a>00166 Q = Q0; 140 <a name="l00167"></a>00167 } 141 <a name="l00168"></a>00168 142 <a name="l00169"></a>00169 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 143 <a name="l00170"></a><a class="code" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c">00170</a> <span class="keywordtype">void</span> <a class="code" href="classKalman.html#7750ffd73f261828a32c18aaeb65c75c" title="Here dt = [yt;ut] of appropriate dimensions.">Kalman<sq_T>::bayes</a>( <span class="keyword">const</span> vec &dt) { 144 <a name="l00171"></a>00171 it_assert_debug( dt.length()==( dimy+dimu ),<span class="stringliteral">"KalmanFull::bayes wrong size of dt"</span> ); 145 <a name="l00172"></a>00172 146 <a name="l00173"></a>00173 vec u = dt.get( dimy,dimy+dimu-1 ); 147 <a name="l00174"></a>00174 vec y = dt.get( 0,dimy-1 ); 148 <a name="l00175"></a>00175 <span class="comment">//Time update</span> 149 <a name="l00176"></a>00176 *_mu = A*(*_mu) + B*u; 150 <a name="l00177"></a>00177 <span class="comment">//P = A*P*A.transpose() + Q; in sq_T</span> 151 <a name="l00178"></a>00178 _P->mult_sym( A ); 152 <a name="l00179"></a>00179 (*_P)+=Q; 153 <a name="l00180"></a>00180 154 <a name="l00181"></a>00181 <span class="comment">//Data update</span> 155 <a name="l00182"></a>00182 <span class="comment">//_Ry = C*P*C.transpose() + R; in sq_T</span> 156 <a name="l00183"></a>00183 _P->mult_sym( C, *_Ry); 157 <a name="l00184"></a>00184 (*_Ry)+=R; 158 <a name="l00185"></a>00185 159 <a name="l00186"></a>00186 mat Pfull = _P->to_mat(); 160 <a name="l00187"></a>00187 161 <a name="l00188"></a>00188 _Ry->inv( *_iRy ); <span class="comment">// result is in _iRy;</span> 162 <a name="l00189"></a>00189 _K = Pfull*C.transpose()*(_iRy->to_mat()); 163 <a name="l00190"></a>00190 164 <a name="l00191"></a>00191 sq_T pom((<span class="keywordtype">int</span>)Pfull.rows()); 165 <a name="l00192"></a>00192 _iRy->mult_sym_t(C*Pfull,pom); 166 <a name="l00193"></a>00193 (*_P) -= pom; <span class="comment">// P = P -PC'iRy*CP;</span> 167 <a name="l00194"></a>00194 (*_yp) = C*(*_mu)+D*u; <span class="comment">//y prediction</span> 168 <a name="l00195"></a>00195 (*_mu) += _K*( y-(*_yp) ); 169 <a name="l00196"></a>00196 170 <a name="l00197"></a>00197 <span class="keywordflow">if</span> (<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>==<span class="keyword">true</span>) { 171 <a name="l00198"></a>00198 <a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>+=<a class="code" href="classKalman.html#e580ab06483952bd03f2e651763e184f" title="preditive density on $y_t$">fy</a>.evalpdflog(*_yp); 172 <a name="l00199"></a>00199 } 173 <a name="l00200"></a>00200 }; 174 <a name="l00201"></a>00201 175 <a name="l00202"></a>00202 <span class="comment">//TODO why not const pointer??</span> 176 <a name="l00203"></a>00203 177 <a name="l00204"></a>00204 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 178 <a name="l00205"></a><a class="code" href="classEKF.html#ea4f3254cacf0a92d2a820b1201d049e">00205</a> <a class="code" href="classEKF.html#ea4f3254cacf0a92d2a820b1201d049e" title="Default constructor.">EKF<sq_T>::EKF</a>(<a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvx0, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvy0, <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvu0): <a class="code" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a><ldmat>(rvx0,rvy0,rvu0){} 179 <a name="l00206"></a>00206 180 <a name="l00207"></a>00207 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 181 <a name="l00208"></a>00208 <span class="keywordtype">void</span> <a class="code" href="classEKF.html" title="Extended Kalman Filter.">EKF<sq_T>::set_parameters</a>(<a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* pfxu0, <a class="code" href="classdiffbifn.html" title="Class representing a differentiable function of two variables $f(x,u)$.">diffbifn</a>* phxu0,<span class="keyword">const</span> sq_T Q0,<span class="keyword">const</span> sq_T R0) { 182 <a name="l00209"></a>00209 pfxu = pfxu0; 183 <a name="l00210"></a>00210 phxu = phxu0; 184 <a name="l00211"></a>00211 185 <a name="l00212"></a>00212 <span class="comment">//initialize matrices A C, later, these will be only updated!</span> 186 <a name="l00213"></a>00213 pfxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(*_mu,zeros(dimu),A,<span class="keyword">true</span>); 187 <a name="l00214"></a>00214 pfxu-><a class="code" href="classdiffbifn.html#1978bafd7909d15c139a08c495c24aa0" title="Evaluates and writes result into A .">dfdu_cond</a>(*_mu,zeros(dimu),B,<span class="keyword">true</span>); 188 <a name="l00215"></a>00215 phxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(*_mu,zeros(dimu),C,<span class="keyword">true</span>); 189 <a name="l00216"></a>00216 phxu-><a class="code" href="classdiffbifn.html#1978bafd7909d15c139a08c495c24aa0" title="Evaluates and writes result into A .">dfdu_cond</a>(*_mu,zeros(dimu),D,<span class="keyword">true</span>); 190 <a name="l00217"></a>00217 191 <a name="l00218"></a>00218 R = R0; 192 <a name="l00219"></a>00219 Q = Q0; 193 <a name="l00220"></a>00220 194 <a name="l00221"></a>00221 <span class="keyword">using</span> std::cout; 195 <a name="l00222"></a>00222 cout<<A<<std::endl; 196 <a name="l00223"></a>00223 cout<<B<<std::endl; 197 <a name="l00224"></a>00224 cout<<C<<std::endl; 198 <a name="l00225"></a>00225 cout<<D<<std::endl; 199 <a name="l00226"></a>00226 200 <a name="l00227"></a>00227 } 201 <a name="l00228"></a>00228 202 <a name="l00229"></a>00229 <span class="keyword">template</span><<span class="keyword">class</span> sq_T> 203 <a name="l00230"></a><a class="code" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7">00230</a> <span class="keywordtype">void</span> <a class="code" href="classEKF.html#c79c62c9b3e0b56b3aaa1b6f1d9a7af7" title="Here dt = [yt;ut] of appropriate dimensions.">EKF<sq_T>::bayes</a>( <span class="keyword">const</span> vec &dt) { 204 <a name="l00231"></a>00231 it_assert_debug( dt.length()==( dimy+dimu ),<span class="stringliteral">"KalmanFull::bayes wrong size of dt"</span> ); 205 <a name="l00232"></a>00232 206 <a name="l00233"></a>00233 vec u = dt.get( dimy,dimy+dimu-1 ); 207 <a name="l00234"></a>00234 vec y = dt.get( 0,dimy-1 ); 208 <a name="l00235"></a>00235 <span class="comment">//Time update</span> 209 <a name="l00236"></a>00236 *_mu = pfxu-><a class="code" href="classdiffbifn.html#ad7673e16aa1a046b131b24c731c4632" title="Evaluates $f(x0,u0)$ (VS: Do we really need common eval? ).">eval</a>(*_mu, u); 210 <a name="l00237"></a>00237 pfxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(*_mu,u,A,<span class="keyword">false</span>); <span class="comment">//update A by a derivative of fx</span> 211 <a name="l00238"></a>00238 212 <a name="l00239"></a>00239 <span class="comment">//P = A*P*A.transpose() + Q; in sq_T</span> 213 <a name="l00240"></a>00240 _P->mult_sym( A ); 214 <a name="l00241"></a>00241 (*_P)+=Q; 215 <a name="l00242"></a>00242 216 <a name="l00243"></a>00243 <span class="comment">//Data update</span> 217 <a name="l00244"></a>00244 phxu-><a class="code" href="classdiffbifn.html#6d217a02d4fa13931258d4bebdd0feb4" title="Evaluates and writes result into A .">dfdx_cond</a>(*_mu,u,C,<span class="keyword">false</span>); <span class="comment">//update C by a derivative hx</span> 218 <a name="l00245"></a>00245 <span class="comment">//_Ry = C*P*C.transpose() + R; in sq_T</span> 219 <a name="l00246"></a>00246 _P->mult_sym( C, *_Ry); 220 <a name="l00247"></a>00247 (*_Ry)+=R; 221 <a name="l00248"></a>00248 222 <a name="l00249"></a>00249 mat Pfull = _P->to_mat(); 223 <a name="l00250"></a>00250 224 <a name="l00251"></a>00251 _Ry->inv( *_iRy ); <span class="comment">// result is in _iRy;</span> 225 <a name="l00252"></a>00252 _K = Pfull*C.transpose()*(_iRy->to_mat()); 226 <a name="l00253"></a>00253 227 <a name="l00254"></a>00254 sq_T pom((<span class="keywordtype">int</span>)Pfull.rows()); 228 <a name="l00255"></a>00255 _iRy->mult_sym_t(C*Pfull,pom); 229 <a name="l00256"></a>00256 (*_P) -= pom; <span class="comment">// P = P -PC'iRy*CP;</span> 230 <a name="l00257"></a>00257 *_yp = phxu-><a class="code" href="classdiffbifn.html#ad7673e16aa1a046b131b24c731c4632" title="Evaluates $f(x0,u0)$ (VS: Do we really need common eval? ).">eval</a>(*_mu,u); <span class="comment">//y prediction</span> 231 <a name="l00258"></a>00258 (*_mu) += _K*( y-*_yp ); 232 <a name="l00259"></a>00259 233 <a name="l00260"></a>00260 <span class="keywordflow">if</span> (<a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>==<span class="keyword">true</span>) {<a class="code" href="classBM.html#5623fef6572a08c2b53b8c87b82dc979" title="Logarithm of marginalized data likelihood.">ll</a>+=<a class="code" href="classKalman.html#5568c74bac67ae6d3b1061dba60c9424" title="posterior density on $x_t$">est</a>.<a class="code" href="classenorm.html#9517594915e897584eaebbb057ed8881" title="Compute log-probability of argument val.">evalpdflog</a>(y);} 234 <a name="l00261"></a>00261 }; 235 <a name="l00262"></a>00262 236 <a name="l00263"></a>00263 237 <a name="l00264"></a>00264 <span class="preprocessor">#endif // KF_H</span> 238 <a name="l00265"></a>00265 <span class="preprocessor"></span> 239 <a name="l00266"></a>00266 240 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:39 2008 for mixpp by 215 241 <a href="http://www.doxygen.org/index.html"> 216 242 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libKF_8h.html ¶
r28 r32 18 18 <code>#include <itpp/itbase.h></code><br> 19 19 <code>#include "../stat/libFN.h"</code><br> 20 <code>#include "<a class="el" href="lib DC_8h-source.html">../math/libDC.h</a>"</code><br>20 <code>#include "<a class="el" href="libEF_8h-source.html">../stat/libEF.h</a>"</code><br> 21 21 22 22 <p> … … 26 26 <p><center><img src="libKF_8h__incl.png" border="0" usemap="#work/mixpp/bdm/estim/libKF.h_map" alt=""></center> 27 27 <map name="work/mixpp/bdm/estim/libKF.h_map"> 28 <area shape="rect" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords=" 44,239,143,265"><area shape="rect" href="libFN_8h-source.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="59,84,165,111"><area shape="rect" href="libDC_8h.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="187,161,304,188"><area shape="rect" href="libBM_8h.html" title="libBM.h" alt="" coords="96,161,163,188"></map>28 <area shape="rect" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="128,239,227,265"><area shape="rect" href="libFN_8h-source.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="59,84,165,111"><area shape="rect" href="libEF_8h.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="189,84,291,111"><area shape="rect" href="libBM_8h.html" title="libBM.h" alt="" coords="109,161,176,188"><area shape="rect" href="libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="251,161,368,188"><area shape="rect" href="itpp__ext_8h-source.html" title="Probability distributions for Exponential Family models." alt="" coords="392,161,488,188"></map> 29 29 </div> 30 30 … … 42 42 43 43 <tr><td class="mdescLeft"> </td><td class="mdescRight">Extended <a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> Filter. <a href="classEKF.html#_details">More...</a><br></td></tr> 44 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classKFcondQR.html">KFcondQR</a></td></tr> 45 46 <tr><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="classKalman.html" title="Kalman filter with covariance matrices in square root form.">Kalman</a> Filter with conditional diagonal matrices R and Q. <a href="classKFcondQR.html#_details">More...</a><br></td></tr> 44 47 </table> 45 48 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 48 51 <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 49 52 ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 50 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:392008 for mixpp by 53 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 51 54 <a href="http://www.doxygen.org/index.html"> 52 55 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libKF_8h__incl.map ¶
r23 r32 1 <area shape="rect" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords=" 44,239,143,265">1 <area shape="rect" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="128,239,227,265"> 2 2 <area shape="rect" href="$libFN_8h-source.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="59,84,165,111"> 3 <area shape="rect" href="$libDC_8h.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="187,161,304,188"> 4 <area shape="rect" href="$libBM_8h.html" title="libBM.h" alt="" coords="96,161,163,188"> 3 <area shape="rect" href="$libEF_8h.html" title="Bayesian Filtering for linear Gaussian models (Kalman Filter) and extensions." alt="" coords="189,84,291,111"> 4 <area shape="rect" href="$libBM_8h.html" title="libBM.h" alt="" coords="109,161,176,188"> 5 <area shape="rect" href="$libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="251,161,368,188"> 6 <area shape="rect" href="$itpp__ext_8h-source.html" title="Probability distributions for Exponential Family models." alt="" coords="392,161,488,188"> -
TabularUnified doc/html/libKF_8h__incl.md5 ¶
r23 r32 1 60d5f9757a0e782891a97a13b81bee62 1 01eaba2003c36d4e3ad3a3f82c883e36 -
TabularUnified doc/html/libPF_8h-source.html ¶
r28 r32 19 19 <a name="l00015"></a>00015 <span class="preprocessor"></span> 20 20 <a name="l00016"></a>00016 <span class="preprocessor">#include <itpp/itbase.h></span> 21 <a name="l00017"></a>00017 <span class="preprocessor">#include "../stat/lib BM.h"</span>21 <a name="l00017"></a>00017 <span class="preprocessor">#include "../stat/libEF.h"</span> 22 22 <a name="l00018"></a>00018 <span class="preprocessor">#include "../math/libDC.h"</span> 23 23 <a name="l00019"></a>00019 24 24 <a name="l00020"></a>00020 <span class="keyword">using namespace </span>itpp; 25 25 <a name="l00021"></a>00021 26 <a name="l00022"></a>00022 <span class="keyword">enum</span> RESAMPLING_METHOD { MULTINOMIAL = 0, STRATIFIED = 1, SYSTEMATIC = 3 }; 27 <a name="l00023"></a>00023 28 <a name="l00029"></a><a class="code" href="classPF.html">00029</a> <span class="keyword">class </span><a class="code" href="classPF.html" title="A Particle Filter prototype.">PF</a> : <span class="keyword">public</span> <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 29 <a name="l00030"></a>00030 <span class="keyword">protected</span>: 30 <a name="l00031"></a>00031 <span class="keywordtype">int</span> n; <span class="comment">//number of particles</span> 31 <a name="l00032"></a>00032 vec w; <span class="comment">//particle weights</span> 32 <a name="l00033"></a>00033 Uniform_RNG URNG; <span class="comment">//used for resampling</span> 33 <a name="l00034"></a>00034 34 <a name="l00035"></a>00035 <span class="keyword">public</span>: 35 <a name="l00037"></a>00037 ivec <a class="code" href="classPF.html#a0e26b2f6a5884aca49122f3e4f0cf19" title="Returns indexes of particles that should be resampled. The ordering MUST guarantee...">resample</a>(RESAMPLING_METHOD method = SYSTEMATIC); 36 <a name="l00038"></a>00038 <a class="code" href="classPF.html" title="A Particle Filter prototype.">PF</a> (vec w); 37 <a name="l00039"></a>00039 <span class="comment">//TODO remove or implement bayes()!</span> 38 <a name="l00040"></a>00040 <span class="keywordtype">void</span> bayes(<span class="keyword">const</span> vec &dt, <span class="keywordtype">bool</span> evell){}; 39 <a name="l00041"></a>00041 }; 40 <a name="l00042"></a>00042 41 <a name="l00049"></a><a class="code" href="classTrivialPF.html">00049</a> <span class="keyword">class </span><a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a> : <span class="keyword">public</span> <a class="code" href="classPF.html" title="A Particle Filter prototype.">PF</a> { 42 <a name="l00050"></a>00050 Array<vec> ptcls; 43 <a name="l00051"></a>00051 44 <a name="l00052"></a>00052 <span class="keywordtype">bool</span> is_proposal; 45 <a name="l00053"></a>00053 <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> *prop; 46 <a name="l00054"></a>00054 <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *par; 47 <a name="l00055"></a>00055 <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> *obs; 48 <a name="l00056"></a>00056 49 <a name="l00057"></a>00057 <span class="keyword">public</span>: 50 <a name="l00058"></a>00058 <a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a>(<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs, <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> &prop, <span class="keywordtype">int</span> n0); 51 <a name="l00059"></a>00059 <a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a>(<a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs, <span class="keywordtype">int</span> n0); 52 <a name="l00060"></a>00060 <span class="keywordtype">void</span> bayes(<span class="keyword">const</span> vec &dt, <span class="keywordtype">bool</span> <a class="code" href="classBM.html#bf6fb59b30141074f8ee1e2f43d03129" title="If true, the filter will compute likelihood of the data record and store it in ll...">evalll</a>); 53 <a name="l00061"></a>00061 }; 54 <a name="l00062"></a>00062 55 <a name="l00063"></a>00063 <span class="keyword">class </span>MPF : <span class="keyword">public</span> <a class="code" href="classTrivialPF.html" title="Trivial particle filter with proposal density that is not conditioned on the data...">TrivialPF</a> { 56 <a name="l00064"></a>00064 Array<BM> Bms; 57 <a name="l00065"></a>00065 <span class="keyword">public</span>: 58 <a name="l00066"></a>00066 MPF(<a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> &B, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &prop, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par); 59 <a name="l00067"></a>00067 <span class="keywordtype">void</span> bayes(vec &dt); 60 <a name="l00068"></a>00068 }; 61 <a name="l00069"></a>00069 62 <a name="l00070"></a>00070 <span class="preprocessor">#endif // KF_H</span> 63 <a name="l00071"></a>00071 <span class="preprocessor"></span> 64 <a name="l00072"></a>00072 65 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:39 2008 for mixpp by 26 <a name="l00027"></a><a class="code" href="classPF.html">00027</a> <span class="keyword">class </span><a class="code" href="classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model...">PF</a> : <span class="keyword">public</span> <a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a> { 27 <a name="l00028"></a>00028 <span class="keyword">protected</span>: 28 <a name="l00030"></a><a class="code" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280">00030</a> <span class="keywordtype">int</span> <a class="code" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280" title="number of particles;">n</a>; 29 <a name="l00032"></a><a class="code" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0">00032</a> <a class="code" href="classeEmp.html" title="Weighted empirical density.">eEmp</a> <a class="code" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0" title="posterior density">ePdf</a>; 30 <a name="l00034"></a><a class="code" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0">00034</a> vec &<a class="code" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0" title="pointer into eEmp ">w</a>; 31 <a name="l00036"></a><a class="code" href="classPF.html#361743a0b5b89de1a29e91d1343b2565">00036</a> Array<vec> &<a class="code" href="classPF.html#361743a0b5b89de1a29e91d1343b2565" title="pointer into eEmp ">samples</a>; 32 <a name="l00038"></a><a class="code" href="classPF.html#d92ac103f88f8c21e197e90af5695a09">00038</a> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &<a class="code" href="classPF.html#d92ac103f88f8c21e197e90af5695a09" title="Parameter evolution model.">par</a>; 33 <a name="l00040"></a><a class="code" href="classPF.html#dd0a687a4515333d6809147335854e77">00040</a> <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &<a class="code" href="classPF.html#dd0a687a4515333d6809147335854e77" title="Observation model.">obs</a>; 34 <a name="l00041"></a>00041 <span class="keyword">public</span>: 35 <a name="l00042"></a>00042 <a class="code" href="classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model...">PF</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par0, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs0, <span class="keywordtype">int</span> <a class="code" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280" title="number of particles;">n</a> ) :<a class="code" href="classBM.html" title="Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities.">BM</a>(rv0), 36 <a name="l00043"></a>00043 n ( 1 ),<a class="code" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0" title="posterior density">ePdf</a> ( rv0 ),<a class="code" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0" title="pointer into eEmp ">w</a> ( <a class="code" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0" title="posterior density">ePdf</a>._w() ),<a class="code" href="classPF.html#361743a0b5b89de1a29e91d1343b2565" title="pointer into eEmp ">samples</a> ( <a class="code" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0" title="posterior density">ePdf</a>._samples() ), 37 <a name="l00044"></a>00044 <a class="code" href="classPF.html#d92ac103f88f8c21e197e90af5695a09" title="Parameter evolution model.">par</a> ( par0 ), <a class="code" href="classPF.html#dd0a687a4515333d6809147335854e77" title="Observation model.">obs</a> ( obs0 ) {}; 38 <a name="l00045"></a>00045 <span class="comment">// void set_parametres(mpdf &par0, mpdf &obs0) {par=&par0;obs=&obs0;};</span> 39 <a name="l00046"></a>00046 <span class="keywordtype">void</span> set_est ( <span class="keyword">const</span> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>* &epdf0 ); 40 <a name="l00047"></a>00047 <span class="comment">//TODO remove or implement bayes()!</span> 41 <a name="l00048"></a>00048 <span class="keywordtype">void</span> <a class="code" href="classPF.html#64f636bbd63bea9efd778214e6b631d3" title="Incremental Bayes rule.">bayes</a> ( <span class="keyword">const</span> vec &dt ); 42 <a name="l00049"></a>00049 }; 43 <a name="l00050"></a>00050 44 <a name="l00057"></a>00057 <span class="keyword">template</span><<span class="keyword">class</span> BM_T> 45 <a name="l00058"></a><a class="code" href="classMPF.html">00058</a> <span class="keyword">class </span><a class="code" href="classMPF.html" title="Marginalized Particle filter.">MPF</a> : <span class="keyword">public</span> <a class="code" href="classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model...">PF</a> { 46 <a name="l00059"></a>00059 BM_T* Bms[1000]; 47 <a name="l00060"></a>00060 <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> rvc; 48 <a name="l00061"></a>00061 <a class="code" href="classemix.html" title="Weighted mixture of epdfs with external owned components.">emix</a> est; 49 <a name="l00062"></a>00062 <span class="keyword">public</span>: 50 <a name="l00064"></a><a class="code" href="classMPF.html#827a66609cf69a832535d52233f76fa0">00064</a> <a class="code" href="classMPF.html#827a66609cf69a832535d52233f76fa0" title="Default constructor.">MPF</a> ( <span class="keyword">const</span> <a class="code" href="classRV.html" title="Class representing variables, most often random variables.">RV</a> &rv0, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &par0, <a class="code" href="classmpdf.html" title="Conditional probability density, e.g. modeling some dependencies.">mpdf</a> &obs0, <span class="keywordtype">int</span> <a class="code" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280" title="number of particles;">n</a>, <span class="keyword">const</span> BM_T &BMcond0 ) : 51 <a name="l00065"></a>00065 <a class="code" href="classPF.html" title="Trivial particle filter with proposal density equal to parameter evolution model...">PF</a> ( rv0,par0,obs0,n ), est(rv0,<a class="code" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0" title="pointer into eEmp ">w</a>) { 52 <a name="l00066"></a>00066 <span class="comment">//</span> 53 <a name="l00067"></a>00067 <span class="keywordflow">if</span> (n>1000) it_error(<span class="stringliteral">"increase 1000 here!"</span>); 54 <a name="l00068"></a>00068 <span class="keywordflow">for</span> ( <span class="keywordtype">int</span> i=0;i<n;i++ ) { 55 <a name="l00069"></a>00069 Bms[i] = <span class="keyword">new</span> BM_T(BMcond0); <span class="comment">//copy constructor</span> 56 <a name="l00070"></a>00070 <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& pom=Bms[i]->_epdf(); 57 <a name="l00071"></a>00071 est.<a class="code" href="classemix.html#599366d678152cfb0703da697b6b1de1">set_parameters</a>(i,&pom); 58 <a name="l00072"></a>00072 } 59 <a name="l00073"></a>00073 }; 60 <a name="l00074"></a>00074 ~<a class="code" href="classMPF.html" title="Marginalized Particle filter.">MPF</a>() { 61 <a name="l00075"></a>00075 } 62 <a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623" title="Incremental Bayes rule.">bayes</a> (<span class="keyword">const</span> vec &dt ); 63 <a name="l00077"></a><a class="code" href="classMPF.html#549e08268a46a250f21a33d06f19276a">00077</a> <a class="code" href="classepdf.html" title="Probability density function with numerical statistics, e.g. posterior density.">epdf</a>& <a class="code" href="classMPF.html#549e08268a46a250f21a33d06f19276a" title="Returns a pointer to the epdf representing posterior density on parameters. Use with...">_epdf</a>(){<span class="keywordflow">return</span> est;} 64 <a name="l00078"></a>00078 }; 65 <a name="l00079"></a>00079 66 <a name="l00080"></a>00080 <span class="keyword">template</span><<span class="keyword">class</span> BM_T> 67 <a name="l00081"></a><a class="code" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623">00081</a> <span class="keywordtype">void</span> <a class="code" href="classMPF.html#55daf8e4b6553dd9f47c692de7931623" title="Incremental Bayes rule.">MPF<BM_T>::bayes</a>( <span class="keyword">const</span> vec &dt) { 68 <a name="l00082"></a>00082 <span class="keywordtype">int</span> i; 69 <a name="l00083"></a>00083 vec lls(<a class="code" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280" title="number of particles;">n</a>); 70 <a name="l00084"></a>00084 ivec ind; 71 <a name="l00085"></a>00085 <span class="keywordtype">double</span> mlls=-std::numeric_limits<double>::infinity(), sum=0.0; 72 <a name="l00086"></a>00086 73 <a name="l00087"></a>00087 <span class="keywordflow">for</span> ( i=0;i<<a class="code" href="classPF.html#2c2f44ed7a4eaa42e07bdb58d503f280" title="number of particles;">n</a>;i++ ) { 74 <a name="l00088"></a>00088 <span class="comment">//generate new samples from paramater evolution model;</span> 75 <a name="l00089"></a>00089 <a class="code" href="classPF.html#361743a0b5b89de1a29e91d1343b2565" title="pointer into eEmp ">samples</a>(i) = <a class="code" href="classPF.html#d92ac103f88f8c21e197e90af5695a09" title="Parameter evolution model.">par</a>.<a class="code" href="classmpdf.html#c20c796f8d0a201f0897299150e45a41" title="Returns the required moment of the epdf.">samplecond</a>( <a class="code" href="classPF.html#361743a0b5b89de1a29e91d1343b2565" title="pointer into eEmp ">samples</a>( i ), lls(i) ); 76 <a name="l00090"></a>00090 <span class="keywordflow">if</span> (lls(i)>mlls) mlls=lls(i); <span class="comment">//find maximum</span> 77 <a name="l00091"></a>00091 } 78 <a name="l00092"></a>00092 <span class="comment">// compute weights </span> 79 <a name="l00093"></a>00093 <span class="keywordflow">for</span> ( i=0;i<n;i++ ) { 80 <a name="l00094"></a>00094 <a class="code" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0" title="pointer into eEmp ">w</a>(i) *= exp( lls(i) - mlls); <span class="comment">// multiply w by likelihood</span> 81 <a name="l00095"></a>00095 } 82 <a name="l00096"></a>00096 <span class="comment">//renormalize</span> 83 <a name="l00097"></a>00097 <span class="keywordflow">for</span> ( i=0;i<n;i++ ){sum+=<a class="code" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0" title="pointer into eEmp ">w</a>( i );}; 84 <a name="l00098"></a>00098 <a class="code" href="classPF.html#a97d12da4d1832c0b0c6ec5877f921f0" title="pointer into eEmp ">w</a>( i ) /=sum; <span class="comment">//?</span> 85 <a name="l00099"></a>00099 86 <a name="l00100"></a>00100 ind = <a class="code" href="classPF.html#a2ac56d1e3ffbb4ff0b3f02e6399deb0" title="posterior density">ePdf</a>.<a class="code" href="classeEmp.html#77268292fc4465cb73ddbfb1f2932a59" title="Function performs resampling, i.e. removal of low-weight samples and duplication...">resample</a>(); 87 <a name="l00101"></a>00101 88 <a name="l00102"></a>00102 } 89 <a name="l00103"></a>00103 90 <a name="l00104"></a>00104 <span class="preprocessor">#endif // KF_H</span> 91 <a name="l00105"></a>00105 <span class="preprocessor"></span> 92 <a name="l00106"></a>00106 93 </pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 66 94 <a href="http://www.doxygen.org/index.html"> 67 95 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libPF_8h.html ¶
r28 r32 17 17 <p> 18 18 <code>#include <itpp/itbase.h></code><br> 19 <code>#include "<a class="el" href="lib BM_8h-source.html">../stat/libBM.h</a>"</code><br>19 <code>#include "<a class="el" href="libEF_8h-source.html">../stat/libEF.h</a>"</code><br> 20 20 <code>#include "<a class="el" href="libDC_8h-source.html">../math/libDC.h</a>"</code><br> 21 21 … … 26 26 <p><center><img src="libPF_8h__incl.png" border="0" usemap="#work/mixpp/bdm/estim/libPF.h_map" alt=""></center> 27 27 <map name="work/mixpp/bdm/estim/libPF.h_map"> 28 <area shape="rect" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords=" 63,161,161,188"><area shape="rect" href="libBM_8h.html" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="57,84,167,111"><area shape="rect" href="libDC_8h.html" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="191,84,308,111"></map>28 <area shape="rect" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="159,239,257,265"><area shape="rect" href="libEF_8h.html" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="157,84,259,111"><area shape="rect" href="libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="53,161,171,188"><area shape="rect" href="libBM_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="245,161,312,188"><area shape="rect" href="itpp__ext_8h-source.html" title="Probability distributions for Exponential Family models." alt="" coords="336,161,432,188"></map> 29 29 </div> 30 30 … … 35 35 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classPF.html">PF</a></td></tr> 36 36 37 <tr><td class="mdescLeft"> </td><td class="mdescRight"> A Particle Filter prototype. <a href="classPF.html#_details">More...</a><br></td></tr>38 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="class TrivialPF.html">TrivialPF</a></td></tr>37 <tr><td class="mdescLeft"> </td><td class="mdescRight">Trivial particle filter with proposal density equal to parameter evolution model. <a href="classPF.html#_details">More...</a><br></td></tr> 38 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><a class="el" href="classMPF.html">MPF< BM_T ></a></td></tr> 39 39 40 <tr><td class="mdescLeft"> </td><td class="mdescRight">Trivial particle filter with proposal density that is not conditioned on the data. <a href="classTrivialPF.html#_details">More...</a><br></td></tr> 41 <tr><td class="memItemLeft" nowrap align="right" valign="top">class </td><td class="memItemRight" valign="bottom"><b>MPF</b></td></tr> 42 43 <tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> 44 <tr><td class="memItemLeft" nowrap align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b>RESAMPLING_METHOD</b> { <b>MULTINOMIAL</b> = 0, 45 <b>STRATIFIED</b> = 1, 46 <b>SYSTEMATIC</b> = 3 47 }</td></tr> 48 40 <tr><td class="mdescLeft"> </td><td class="mdescRight">Marginalized Particle filter. <a href="classMPF.html#_details">More...</a><br></td></tr> 49 41 </table> 50 42 <hr><a name="_details"></a><h2>Detailed Description</h2> … … 53 45 <dl class="author" compact><dt><b>Author:</b></dt><dd>Vaclav Smidl.</dd></dl> 54 46 ----------------------------------- BDM++ - C++ library for Bayesian Decision Making under Uncertainty<p> 55 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Mon Feb 18 21:48:392008 for mixpp by 47 Using IT++ for numerical operations ----------------------------------- <hr size="1"><address style="text-align: right;"><small>Generated on Thu Feb 28 16:54:40 2008 for mixpp by 56 48 <a href="http://www.doxygen.org/index.html"> 57 49 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address> -
TabularUnified doc/html/libPF_8h__incl.map ¶
r23 r32 1 <area shape="rect" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="63,161,161,188"> 2 <area shape="rect" href="$libBM_8h.html" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="57,84,167,111"> 3 <area shape="rect" href="$libDC_8h.html" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="191,84,308,111"> 1 <area shape="rect" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="159,239,257,265"> 2 <area shape="rect" href="$libEF_8h.html" title="Bayesian Filtering using stochastic sampling (Particle Filters)." alt="" coords="157,84,259,111"> 3 <area shape="rect" href="$libDC_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="53,161,171,188"> 4 <area shape="rect" href="$libBM_8h.html" title="Probability distributions for Exponential Family models." alt="" coords="245,161,312,188"> 5 <area shape="rect" href="$itpp__ext_8h-source.html" title="Probability distributions for Exponential Family models." alt="" coords="336,161,432,188"> -
TabularUnified doc/html/libPF_8h__incl.md5 ¶
r23 r32 1 a432bbc2bee5b8f6e1ea2af8334adcb3 1 49de3bc2d5fcf3e66c14dac34f0a5e69 -
TabularUnified doc/latex/annotated.tex ¶
r22 r32 3 3 \item\contentsline{section}{{\bf bilinfn} (Class representing function \$f(x,u) = Ax+Bu\$ )}{\pageref{classbilinfn}}{} 4 4 \item\contentsline{section}{{\bf BM} (Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities )}{\pageref{classBM}}{} 5 \item\contentsline{section}{{\bf BMcond} (Conditional Bayesian Filter )}{\pageref{classBMcond}}{} 5 6 \item\contentsline{section}{{\bf constfn} (Class representing function \$f(x) = a\$, here rv is empty )}{\pageref{classconstfn}}{} 6 7 \item\contentsline{section}{{\bf diffbifn} (Class representing a differentiable function of two variables \$f(x,u)\$ )}{\pageref{classdiffbifn}}{} 7 8 \item\contentsline{section}{{\bf DS} (Abstract class for discrete-time sources of data )}{\pageref{classDS}}{} 8 9 \item\contentsline{section}{{\bf eEF} (General conjugate exponential family posterior density )}{\pageref{classeEF}}{} 10 \item\contentsline{section}{{\bf eEmp} (Weighted empirical density )}{\pageref{classeEmp}}{} 11 \item\contentsline{section}{{\bf egamma} (Gamma posterior density )}{\pageref{classegamma}}{} 9 12 \item\contentsline{section}{{\bf EKF$<$ sq\_\-T $>$} (Extended \doxyref{Kalman}{p.}{classKalman} Filter )}{\pageref{classEKF}}{} 13 \item\contentsline{section}{{\bf emix} (Weighted mixture of epdfs with external owned components )}{\pageref{classemix}}{} 10 14 \item\contentsline{section}{{\bf enorm$<$ sq\_\-T $>$} (Gaussian density with positive definite (decomposed) covariance matrix )}{\pageref{classenorm}}{} 11 15 \item\contentsline{section}{{\bf epdf} (Probability density function with numerical statistics, e.g. posterior density )}{\pageref{classepdf}}{} 16 \item\contentsline{section}{{\bf euni} (Uniform distributed density on a rectangular support )}{\pageref{classeuni}}{} 12 17 \item\contentsline{section}{{\bf fnc} (Class representing function \$f(x)\$ of variable \$x\$ represented by {\tt rv} )}{\pageref{classfnc}}{} 13 18 \item\contentsline{section}{{\bf fsqmat} (Fake \doxyref{sqmat}{p.}{classsqmat}. This class maps \doxyref{sqmat}{p.}{classsqmat} operations to operations on full matrix )}{\pageref{classfsqmat}}{} 19 \item\contentsline{section}{{\bf itpp::Gamma\_\-RNG} (Gamma distribution )}{\pageref{classitpp_1_1Gamma__RNG}}{} 14 20 \item\contentsline{section}{{\bf Kalman$<$ sq\_\-T $>$} (\doxyref{Kalman}{p.}{classKalman} filter with covariance matrices in square root form )}{\pageref{classKalman}}{} 15 21 \item\contentsline{section}{{\bf KalmanFull} (Basic \doxyref{Kalman}{p.}{classKalman} filter with full matrices (education purpose only)! Will be deleted soon! )}{\pageref{classKalmanFull}}{} 22 \item\contentsline{section}{{\bf KFcondQR} (\doxyref{Kalman}{p.}{classKalman} Filter with conditional diagonal matrices R and Q )}{\pageref{classKFcondQR}}{} 16 23 \item\contentsline{section}{{\bf linfn} (Class representing function \$f(x) = Ax+B\$ )}{\pageref{classlinfn}}{} 17 24 \item\contentsline{section}{{\bf MemDS} (Class representing off-line data stored in memory )}{\pageref{classMemDS}}{} 25 \item\contentsline{section}{{\bf mgamma} (Gamma random walk )}{\pageref{classmgamma}}{} 26 \item\contentsline{section}{{\bf mlnorm$<$ sq\_\-T $>$} (Normal distributed linear function with linear function of mean value; )}{\pageref{classmlnorm}}{} 18 27 \item\contentsline{section}{{\bf mpdf} (Conditional probability density, e.g. modeling some dependencies )}{\pageref{classmpdf}}{} 19 \item\contentsline{section}{{\bf PF} (A Particle Filter prototype )}{\pageref{classPF}}{} 28 \item\contentsline{section}{{\bf MPF$<$ BM\_\-T $>$} (Marginalized Particle filter )}{\pageref{classMPF}}{} 29 \item\contentsline{section}{{\bf PF} (Trivial particle filter with proposal density equal to parameter evolution model )}{\pageref{classPF}}{} 20 30 \item\contentsline{section}{{\bf RV} (Class representing variables, most often random variables )}{\pageref{classRV}}{} 21 31 \item\contentsline{section}{{\bf sqmat} (Virtual class for representation of double symmetric matrices in square-root form )}{\pageref{classsqmat}}{} 22 \item\contentsline{section}{{\bf TrivialPF} (Trivial particle filter with proposal density that is not conditioned on the data )}{\pageref{classTrivialPF}}{}23 32 \end{CompactList} -
TabularUnified doc/latex/classBM.tex ¶
r28 r32 10 10 \begin{center} 11 11 \leavevmode 12 \includegraphics[width=161pt]{classBM__inherit__graph} 12 \includegraphics[width=142pt]{classBM__inherit__graph} 13 \end{center} 14 \end{figure} 15 Collaboration diagram for BM:\nopagebreak 16 \begin{figure}[H] 17 \begin{center} 18 \leavevmode 19 \includegraphics[width=38pt]{classBM__coll__graph} 13 20 \end{center} 14 21 \end{figure} … … 16 23 \begin{CompactItemize} 17 24 \item 18 {\bf BM} ( )\label{classBM_ef32a12f4f89e4000bf5390ceda762ae}25 {\bf BM} (const {\bf RV} \&rv0)\label{classBM_605d28b426adb677c86a57ddb525132a} 19 26 20 27 \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item … … 24 31 25 32 \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 26 {\bf epdf} $\ast$ {\bf \_\-epdf} ()\label{classBM_a5b8f6c8a872738cfaa30ab010e8c077}33 virtual {\bf epdf} \& {\bf \_\-epdf} ()=0\label{classBM_3dc45554556926bde996a267636abe55} 27 34 28 \begin{CompactList}\small\item\em Returns a pointer to the \doxyref{epdf}{p.}{classepdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\end{CompactItemize} 29 \subsection*{Public Attributes} 35 \begin{CompactList}\small\item\em Returns a pointer to the \doxyref{epdf}{p.}{classepdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item 36 virtual {\bf $\sim$BM} ()\label{classBM_ca0f02b3b4144e0895cc14f7e0374bdd} 37 38 \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\end{CompactItemize} 39 \subsection*{Protected Attributes} 30 40 \begin{CompactItemize} 31 41 \item 42 {\bf RV} {\bf rv}\label{classBM_af00f0612fabe66241dd507188cdbf88} 43 44 \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 32 45 double {\bf ll}\label{classBM_5623fef6572a08c2b53b8c87b82dc979} 33 46 … … 56 69 57 70 71 Implemented in {\bf Kalman$<$ sq\_\-T $>$} \doxyref{}{p.}{classKalman_7750ffd73f261828a32c18aaeb65c75c}, {\bf EKF$<$ sq\_\-T $>$} \doxyref{}{p.}{classEKF_c79c62c9b3e0b56b3aaa1b6f1d9a7af7}, {\bf PF} \doxyref{}{p.}{classPF_64f636bbd63bea9efd778214e6b631d3}, {\bf MPF$<$ BM\_\-T $>$} \doxyref{}{p.}{classMPF_55daf8e4b6553dd9f47c692de7931623}, and {\bf Kalman$<$ ldmat $>$} \doxyref{}{p.}{classKalman_7750ffd73f261828a32c18aaeb65c75c}. 72 58 73 The documentation for this class was generated from the following file:\begin{CompactItemize} 59 74 \item -
TabularUnified doc/latex/classKalman.tex ¶
r28 r32 10 10 \begin{center} 11 11 \leavevmode 12 \includegraphics[width= 77pt]{classKalman__inherit__graph}12 \includegraphics[width=103pt]{classKalman__inherit__graph} 13 13 \end{center} 14 14 \end{figure} … … 17 17 \begin{center} 18 18 \leavevmode 19 \includegraphics[width= 70pt]{classKalman__coll__graph}19 \includegraphics[width=81pt]{classKalman__coll__graph} 20 20 \end{center} 21 21 \end{figure} … … 23 23 \begin{CompactItemize} 24 24 \item 25 {\bf Kalman} ( int dimx, int dimu, int dimy)\label{classKalman_96958a5ebfa966d892137987f265083a}25 {\bf Kalman} ({\bf RV} rvx0, {\bf RV} rvy0, {\bf RV} rvu0)\label{classKalman_3d56b0a97b8c1e25fdd3b10eef3c2ad3} 26 26 27 27 \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 28 {\bf Kalman} ( mat A0, mat B0, mat C0, mat D0, sq\_\-T R0, sq\_\-T Q0, sq\_\-T P0, vec mu0)\label{classKalman_83118f4bd2ecbc70b03cfd573088ed6f}28 {\bf Kalman} (const {\bf Kalman}$<$ sq\_\-T $>$ \&K0)\label{classKalman_ce38e31810aea4db45a83ad05eaba009} 29 29 30 \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item 31 void {\bf bayes} (const vec \&dt, bool {\bf evalll}=true)\label{classKalman_e945d9205ca14acbd83ba80ea6f72b8e} 30 \begin{CompactList}\small\item\em Copy constructor. \item\end{CompactList}\item 31 void {\bf set\_\-parameters} (const mat \&A0, const mat \&B0, const mat \&C0, const mat \&D0, const sq\_\-T \&R0, const sq\_\-T \&Q0)\label{classKalman_239b28a0380946f5749b2f8d2807f93a} 32 33 \begin{CompactList}\small\item\em Set parameters with check of relevance. \item\end{CompactList}\item 34 void {\bf set\_\-est} (const vec \&mu0, const sq\_\-T \&P0)\label{classKalman_80bcf29466d9a9dd2b8f74699807d0c0} 35 36 \begin{CompactList}\small\item\em Set estimate values, used e.g. in initialization. \item\end{CompactList}\item 37 void {\bf bayes} (const vec \&dt)\label{classKalman_7750ffd73f261828a32c18aaeb65c75c} 32 38 33 39 \begin{CompactList}\small\item\em Here dt = [yt;ut] of appropriate dimensions. \item\end{CompactList}\item 34 virtual void {\bf bayes} (const vec \&dt)=0 35 \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 40 {\bf epdf} \& {\bf \_\-epdf} ()\label{classKalman_a213c57aef55b2645e550bed81cfc0d4} 41 42 \begin{CompactList}\small\item\em Returns a pointer to the \doxyref{epdf}{p.}{classepdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\item 36 43 void {\bf bayes} (mat Dt)\label{classBM_87b07867fd4c133aa89a18543f68d9f9} 37 44 38 \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 39 {\bf epdf} $\ast$ {\bf \_\-epdf} ()\label{classBM_a5b8f6c8a872738cfaa30ab010e8c077} 40 41 \begin{CompactList}\small\item\em Returns a pointer to the \doxyref{epdf}{p.}{classepdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\end{CompactItemize} 42 \subsection*{Public Attributes} 45 \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\end{CompactItemize} 46 \subsection*{Protected Attributes} 43 47 \begin{CompactItemize} 44 48 \item 45 vec {\bf mu}\label{classKalman_3063a3f58a74cea672ae889971012eed}49 {\bf RV} \textbf{rvy}\label{classKalman_7501230c2fafa3655887d2da23b3184c} 46 50 47 \ begin{CompactList}\small\item\em Mean value of the posterior density. \item\end{CompactList}\item48 sq\_\-T {\bf P}\label{classKalman_188cd5ac1c9e496b1a371eb7c57c97d3}51 \item 52 {\bf RV} \textbf{rvu}\label{classKalman_44a16ffd5ac1e6e39bae34fea9e1e498} 49 53 50 \begin{CompactList}\small\item\em Mean value of the posterior density. \item\end{CompactList}\item51 double {\bf ll}\label{classBM_5623fef6572a08c2b53b8c87b82dc979}52 53 \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item54 bool {\bf evalll}\label{classBM_bf6fb59b30141074f8ee1e2f43d03129}55 56 \begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save time. \item\end{CompactList}\end{CompactItemize}57 \subsection*{Protected Attributes}58 \begin{CompactItemize}59 54 \item 60 55 int \textbf{dimx}\label{classKalman_39c8c403b46fa3b8c7da77cb2e3729eb} … … 85 80 86 81 \item 82 {\bf enorm}$<$ sq\_\-T $>$ {\bf est}\label{classKalman_5568c74bac67ae6d3b1061dba60c9424} 83 84 \begin{CompactList}\small\item\em posterior density on \$x\_\-t\$ \item\end{CompactList}\item 85 {\bf enorm}$<$ sq\_\-T $>$ {\bf fy}\label{classKalman_e580ab06483952bd03f2e651763e184f} 86 87 \begin{CompactList}\small\item\em preditive density on \$y\_\-t\$ \item\end{CompactList}\item 87 88 mat \textbf{\_\-K}\label{classKalman_d422f51467c7a06174af2476d2826132} 88 89 89 90 \item 90 vec \textbf{\_\-yp}\label{classKalman_30b7461989185d3d02cf42b8e2a37649}91 vec $\ast$ \textbf{\_\-yp}\label{classKalman_5188eb0329f8561f0b357af329769bf8} 91 92 92 93 \item 93 sq\_\-T \textbf{\_\-Ry}\label{classKalman_477dca07d91ea1a1f41d51bb0229934f}94 sq\_\-T $\ast$ \textbf{\_\-Ry}\label{classKalman_e17dd745daa8a958035a334a56fa4674} 94 95 95 96 \item 96 sq\_\-T \textbf{\_\-iRy}\label{classKalman_15f1a793210750a7e4642fcd948b24c5}97 sq\_\-T $\ast$ \textbf{\_\-iRy}\label{classKalman_fbbdf31365f5a5674099599200ea193b} 97 98 98 \end{CompactItemize}99 \subsection*{Friends}100 \begin{CompactItemize}101 99 \item 102 std::ostream \& \textbf{operator$<$$<$} (std::ostream \&os, const {\bf KalmanFull} \&kf)\label{classKalman_86ba216243ed95bb46d80d88775d16af}100 vec $\ast$ \textbf{\_\-mu}\label{classKalman_d1f669b5b3421a070cc75d77b55ba734} 103 101 104 \end{CompactItemize} 102 \item 103 sq\_\-T $\ast$ \textbf{\_\-P}\label{classKalman_b3388218567128a797e69b109138271d} 104 105 \item 106 sq\_\-T $\ast$ \textbf{\_\-iP}\label{classKalman_b8bb7f870d69993493ba67ce40e7c3e9} 107 108 \item 109 {\bf RV} {\bf rv}\label{classBM_af00f0612fabe66241dd507188cdbf88} 110 111 \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 112 double {\bf ll}\label{classBM_5623fef6572a08c2b53b8c87b82dc979} 113 114 \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 115 bool {\bf evalll}\label{classBM_bf6fb59b30141074f8ee1e2f43d03129} 116 117 \begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save time. \item\end{CompactList}\end{CompactItemize} 105 118 106 119 … … 110 123 \doxyref{Kalman}{p.}{classKalman} filter with covariance matrices in square root form. 111 124 112 \subsection{Member Function Documentation}113 \index{Kalman@{Kalman}!bayes@{bayes}}114 \index{bayes@{bayes}!Kalman@{Kalman}}115 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void BM::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt [pure virtual, inherited]}}\label{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}116 117 118 Incremental Bayes rule.119 120 \begin{Desc}121 \item[Parameters:]122 \begin{description}123 \item[{\em dt}]vector of input data \end{description}124 \end{Desc}125 126 127 125 The documentation for this class was generated from the following file:\begin{CompactItemize} 128 126 \item -
TabularUnified doc/latex/classKalmanFull.tex ¶
r28 r32 6 6 {\tt \#include $<$libKF.h$>$} 7 7 8 Inheritance diagram for KalmanFull:\nopagebreak9 \begin{figure}[H]10 \begin{center}11 \leavevmode12 \includegraphics[width=56pt]{classKalmanFull__inherit__graph}13 \end{center}14 \end{figure}15 Collaboration diagram for KalmanFull:\nopagebreak16 \begin{figure}[H]17 \begin{center}18 \leavevmode19 \includegraphics[width=56pt]{classKalmanFull__coll__graph}20 \end{center}21 \end{figure}22 8 \subsection*{Public Member Functions} 23 9 \begin{CompactItemize} … … 26 12 27 13 \begin{CompactList}\small\item\em Full constructor. \item\end{CompactList}\item 28 void {\bf bayes} (const vec \&dt , bool {\bf evalll}=true)\label{classKalmanFull_048b13739b94c331cda08249b278552b}14 void {\bf bayes} (const vec \&dt)\label{classKalmanFull_13a041cd98ff157703766be275a657bb} 29 15 30 \begin{CompactList}\small\item\em Here dt = [yt;ut] of appropriate dimensions. \item\end{CompactList}\item 31 virtual void {\bf bayes} (const vec \&dt)=0 32 \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 33 void {\bf bayes} (mat Dt)\label{classBM_87b07867fd4c133aa89a18543f68d9f9} 34 35 \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 36 {\bf epdf} $\ast$ {\bf \_\-epdf} ()\label{classBM_a5b8f6c8a872738cfaa30ab010e8c077} 37 38 \begin{CompactList}\small\item\em Returns a pointer to the \doxyref{epdf}{p.}{classepdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\end{CompactItemize} 16 \begin{CompactList}\small\item\em Here dt = [yt;ut] of appropriate dimensions. \item\end{CompactList}\end{CompactItemize} 39 17 \subsection*{Public Attributes} 40 18 \begin{CompactItemize} … … 45 23 mat {\bf P}\label{classKalmanFull_b75dc059e84fa8ffc076203b30f926cc} 46 24 47 \begin{CompactList}\small\item\em Variance of the posterior density. \item\end{CompactList}\item 48 double {\bf ll}\label{classBM_5623fef6572a08c2b53b8c87b82dc979} 49 50 \begin{CompactList}\small\item\em Logarithm of marginalized data likelihood. \item\end{CompactList}\item 51 bool {\bf evalll}\label{classBM_bf6fb59b30141074f8ee1e2f43d03129} 52 53 \begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save time. \item\end{CompactList}\end{CompactItemize} 25 \begin{CompactList}\small\item\em Variance of the posterior density. \item\end{CompactList}\end{CompactItemize} 54 26 \subsection*{Friends} 55 27 \begin{CompactItemize} … … 63 35 Basic \doxyref{Kalman}{p.}{classKalman} filter with full matrices (education purpose only)! Will be deleted soon! 64 36 65 \subsection{Member Function Documentation}66 \index{KalmanFull@{KalmanFull}!bayes@{bayes}}67 \index{bayes@{bayes}!KalmanFull@{KalmanFull}}68 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void BM::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt [pure virtual, inherited]}}\label{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}69 70 71 Incremental Bayes rule.72 73 \begin{Desc}74 \item[Parameters:]75 \begin{description}76 \item[{\em dt}]vector of input data \end{description}77 \end{Desc}78 79 80 37 The documentation for this class was generated from the following files:\begin{CompactItemize} 81 38 \item -
TabularUnified doc/latex/classPF.tex ¶
r28 r32 1 1 \section{PF Class Reference} 2 2 \label{classPF}\index{PF@{PF}} 3 A Particle Filter prototype.3 Trivial particle filter with proposal density equal to parameter evolution model. 4 4 5 5 … … 10 10 \begin{center} 11 11 \leavevmode 12 \includegraphics[width= 49pt]{classPF__inherit__graph}12 \includegraphics[width=65pt]{classPF__inherit__graph} 13 13 \end{center} 14 14 \end{figure} … … 17 17 \begin{center} 18 18 \leavevmode 19 \includegraphics[width= 38pt]{classPF__coll__graph}19 \includegraphics[width=96pt]{classPF__coll__graph} 20 20 \end{center} 21 21 \end{figure} … … 23 23 \begin{CompactItemize} 24 24 \item 25 ivec {\bf resample} (RESAMPLING\_\-METHOD method=SYSTEMATIC)\label{classPF_a0e26b2f6a5884aca49122f3e4f0cf19} 26 27 \begin{CompactList}\small\item\em Returns indexes of particles that should be resampled. The ordering MUST guarantee inplace replacement. (Important for MPF.). \item\end{CompactList}\item 28 \textbf{PF} (vec w)\label{classPF_c37f95f0c1661c7f1e3fccb31d39de73} 25 \textbf{PF} (const {\bf RV} \&rv0, {\bf mpdf} \&par0, {\bf mpdf} \&obs0, int {\bf n})\label{classPF_e9604b7fc87ff5e61da4de4a04210bfc} 29 26 30 27 \item 31 void \textbf{ bayes} (const vec \&dt, bool evell)\label{classPF_eb06bd7d4325f22f54233967295793b9}28 void \textbf{set\_\-est} (const {\bf epdf} $\ast$\&epdf0)\label{classPF_c5caa2c15604338b773d7a8125e7a1b5} 32 29 33 30 \item 34 v irtual void {\bf bayes} (const vec \&dt)=031 void {\bf bayes} (const vec \&dt) 35 32 \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 36 33 void {\bf bayes} (mat Dt)\label{classBM_87b07867fd4c133aa89a18543f68d9f9} 37 34 38 35 \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 39 {\bf epdf} $\ast$ {\bf \_\-epdf} ()\label{classBM_a5b8f6c8a872738cfaa30ab010e8c077}36 virtual {\bf epdf} \& {\bf \_\-epdf} ()=0\label{classBM_3dc45554556926bde996a267636abe55} 40 37 41 38 \begin{CompactList}\small\item\em Returns a pointer to the \doxyref{epdf}{p.}{classepdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\end{CompactItemize} 42 \subsection*{P ublicAttributes}39 \subsection*{Protected Attributes} 43 40 \begin{CompactItemize} 44 41 \item 42 int {\bf n}\label{classPF_2c2f44ed7a4eaa42e07bdb58d503f280} 43 44 \begin{CompactList}\small\item\em number of particles; \item\end{CompactList}\item 45 {\bf eEmp} {\bf ePdf}\label{classPF_a2ac56d1e3ffbb4ff0b3f02e6399deb0} 46 47 \begin{CompactList}\small\item\em posterior density \item\end{CompactList}\item 48 vec \& {\bf w}\label{classPF_a97d12da4d1832c0b0c6ec5877f921f0} 49 50 \begin{CompactList}\small\item\em pointer into {\tt \doxyref{eEmp}{p.}{classeEmp}} \item\end{CompactList}\item 51 Array$<$ vec $>$ \& {\bf samples}\label{classPF_361743a0b5b89de1a29e91d1343b2565} 52 53 \begin{CompactList}\small\item\em pointer into {\tt \doxyref{eEmp}{p.}{classeEmp}} \item\end{CompactList}\item 54 {\bf mpdf} \& {\bf par}\label{classPF_d92ac103f88f8c21e197e90af5695a09} 55 56 \begin{CompactList}\small\item\em Parameter evolution model. \item\end{CompactList}\item 57 {\bf mpdf} \& {\bf obs}\label{classPF_dd0a687a4515333d6809147335854e77} 58 59 \begin{CompactList}\small\item\em Observation model. \item\end{CompactList}\item 60 {\bf RV} {\bf rv}\label{classBM_af00f0612fabe66241dd507188cdbf88} 61 62 \begin{CompactList}\small\item\em Random variable of the posterior. \item\end{CompactList}\item 45 63 double {\bf ll}\label{classBM_5623fef6572a08c2b53b8c87b82dc979} 46 64 … … 49 67 50 68 \begin{CompactList}\small\item\em If true, the filter will compute likelihood of the data record and store it in {\tt ll} . Set to false if you want to save time. \item\end{CompactList}\end{CompactItemize} 51 \subsection*{Protected Attributes}52 \begin{CompactItemize}53 \item54 int \textbf{n}\label{classPF_2c2f44ed7a4eaa42e07bdb58d503f280}55 56 \item57 vec \textbf{w}\label{classPF_f6bc92f7979af4513b06b161497ba868}58 59 \item60 Uniform\_\-RNG \textbf{URNG}\label{classPF_3568ca7c3b3175d98b548f496b4c34dd}61 62 \end{CompactItemize}63 69 64 70 65 71 \subsection{Detailed Description} 66 A Particle Filter prototype.72 Trivial particle filter with proposal density equal to parameter evolution model. 67 73 68 Bayesian Filtering equations hold.74 Posterior density is represented by a weighted empirical density ({\tt \doxyref{eEmp}{p.}{classeEmp}} ). 69 75 70 76 \subsection{Member Function Documentation} 71 77 \index{PF@{PF}!bayes@{bayes}} 72 78 \index{bayes@{bayes}!PF@{PF}} 73 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}v irtual void BM::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt [pure virtual, inherited]}}\label{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}79 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void PF::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt [virtual]}}\label{classPF_64f636bbd63bea9efd778214e6b631d3} 74 80 75 81 … … 83 89 84 90 91 Implements {\bf BM} \doxyref{}{p.}{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}. 92 93 Reimplemented in {\bf MPF$<$ BM\_\-T $>$} \doxyref{}{p.}{classMPF_55daf8e4b6553dd9f47c692de7931623}. 94 85 95 The documentation for this class was generated from the following files:\begin{CompactItemize} 86 96 \item -
TabularUnified doc/latex/classRV.tex ¶
r22 r32 24 24 25 25 \begin{CompactList}\small\item\em Find indexes of another rv in self. \item\end{CompactList}\item 26 {\bf RV} {\bf add} ( {\bf RV} rv2)\label{classRV_f068a86abb5a6e46fcf76c939d2ed2ec}26 {\bf RV} {\bf add} (const {\bf RV} \&rv2)\label{classRV_18fa114b92017f7f80301a4f8d3a6382} 27 27 28 28 \begin{CompactList}\small\item\em Add (concat) another variable to the current one. \item\end{CompactList}\item … … 42 42 43 43 \begin{CompactList}\small\item\em generate a list of indeces, i.e. which \item\end{CompactList}\end{CompactItemize} 44 \subsection*{Protected Attributes} 45 \begin{CompactItemize} 46 \item 47 int {\bf size}\label{classRV_0cae53d262be90a775a99a198e17fa58} 48 49 \begin{CompactList}\small\item\em size = sum of sizes \item\end{CompactList}\item 50 int {\bf len}\label{classRV_0d7b36e2bbccf880c8fcf1e8cc43c1a9} 51 52 \begin{CompactList}\small\item\em len = number of individual rvs \item\end{CompactList}\item 53 ivec \textbf{ids}\label{classRV_1bd7165140f4b880a7f344bbb1c433f9} 54 55 \item 56 ivec \textbf{sizes}\label{classRV_c878aab13f34b420e1eb5b485563682b} 57 58 \item 59 ivec \textbf{times}\label{classRV_646e530c47a2dd38254b778d9f11ac89} 60 61 \item 62 ivec \textbf{obs}\label{classRV_2999743deec9b4cdb7ce51747bc53319} 63 64 \item 65 Array$<$ std::string $>$ \textbf{names}\label{classRV_df5d0030b277a1db2f1fd5fb79152acb} 66 67 \end{CompactItemize} 44 68 \subsection*{Friends} 45 69 \begin{CompactItemize} -
TabularUnified doc/latex/classTrivialPF.tex ¶
r28 r32 35 35 36 36 \begin{CompactList}\small\item\em Returns indexes of particles that should be resampled. The ordering MUST guarantee inplace replacement. (Important for MPF.). \item\end{CompactList}\item 37 v irtual void {\bf bayes} (const vec \&dt)=037 void {\bf bayes} (const vec \&dt) 38 38 \begin{CompactList}\small\item\em Incremental Bayes rule. \item\end{CompactList}\item 39 39 void {\bf bayes} (mat Dt)\label{classBM_87b07867fd4c133aa89a18543f68d9f9} 40 40 41 41 \begin{CompactList}\small\item\em Batch Bayes rule (columns of Dt are observations). \item\end{CompactList}\item 42 {\bf epdf} $\ast$ {\bf \_\-epdf} ()\label{class BM_a5b8f6c8a872738cfaa30ab010e8c077}42 {\bf epdf} $\ast$ {\bf \_\-epdf} ()\label{classPF_53b7cc5a0709b0d40fb68408437c0aa2} 43 43 44 44 \begin{CompactList}\small\item\em Returns a pointer to the \doxyref{epdf}{p.}{classepdf} representing posterior density on parameters. Use with care! \item\end{CompactList}\end{CompactItemize} … … 72 72 \index{TrivialPF@{TrivialPF}!bayes@{bayes}} 73 73 \index{bayes@{bayes}!TrivialPF@{TrivialPF}} 74 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}v irtual void BM::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt [pure virtual, inherited]}}\label{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}74 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void PF::bayes (const vec \& {\em dt})\hspace{0.3cm}{\tt [inline, virtual, inherited]}}\label{classPF_64f636bbd63bea9efd778214e6b631d3} 75 75 76 76 … … 84 84 85 85 86 Implements {\bf BM} \doxyref{}{p.}{classBM_a892eff438aab2dd1a9e2efcb7fb5bdf}. 87 86 88 The documentation for this class was generated from the following files:\begin{CompactItemize} 87 89 \item -
TabularUnified doc/latex/classeEF.tex ¶
r28 r32 10 10 \begin{center} 11 11 \leavevmode 12 \includegraphics[width= 67pt]{classeEF__inherit__graph}12 \includegraphics[width=127pt]{classeEF__inherit__graph} 13 13 \end{center} 14 14 \end{figure} … … 23 23 \begin{CompactItemize} 24 24 \item 25 {\bf eEF} ()\label{classeEF_702e24158366430bc24d57c7f64e1e9e} 26 27 \begin{CompactList}\small\item\em default constructor \item\end{CompactList}\item 28 \textbf{eEF} (const {\bf RV} \&rv)\label{classeEF_7e3c63655e8375c76bf1f421245427a7} 29 30 \item 25 31 virtual void \textbf{tupdate} (double phi, mat \&vbar, double nubar)\label{classeEF_fd88bc35550ec8fe9281d358216d0fcf} 26 32 … … 33 39 virtual double {\bf eval} (const vec \&val)\label{classepdf_f333ceeb88ebc37d81fcd4cea4526bfc} 34 40 35 \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\end{CompactItemize} 41 \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item 42 virtual double {\bf evalpdflog} (const vec \&val)\label{classepdf_113c76c61d20e3f2a24ba322a73dfc51} 43 44 \begin{CompactList}\small\item\em Compute log-probability of argument {\tt val}. \item\end{CompactList}\item 45 virtual vec {\bf mean} ()=0\label{classepdf_5b61fae74d370d2216576d598c1a74ef} 46 47 \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\end{CompactItemize} 48 \subsection*{Protected Attributes} 49 \begin{CompactItemize} 50 \item 51 {\bf RV} \textbf{rv}\label{classepdf_74da992e3f5d598da8850b646b79b9d9} 52 53 \end{CompactItemize} 36 54 37 55 … … 51 69 Returns a sample from the density, $x \sim epdf(rv)$ 52 70 53 Implemented in {\bf enorm$<$ sq\_\-T $>$} \doxyref{}{p.}{classenorm_6020bcd89db2c9584bd8871001bd2023} .71 Implemented in {\bf enorm$<$ sq\_\-T $>$} \doxyref{}{p.}{classenorm_6020bcd89db2c9584bd8871001bd2023}, {\bf egamma} \doxyref{}{p.}{classegamma_0a2186a586432c2c3f22d09c5341890f}, {\bf emix} \doxyref{}{p.}{classemix_3eb9a8e12ce1c5c8a3ddb245354b6941}, {\bf euni} \doxyref{}{p.}{classeuni_0f71562e3e919aba823cb7d9d420ad4c}, {\bf eEmp} \doxyref{}{p.}{classeEmp_c9b44099a400579b88aff9f5afaf9c13}, and {\bf enorm$<$ ldmat $>$} \doxyref{}{p.}{classenorm_6020bcd89db2c9584bd8871001bd2023}. 54 72 55 73 The documentation for this class was generated from the following file:\begin{CompactItemize} -
TabularUnified doc/latex/classenorm.tex ¶
r22 r32 10 10 \begin{center} 11 11 \leavevmode 12 \includegraphics[width= 67pt]{classenorm__inherit__graph}12 \includegraphics[width=71pt]{classenorm__inherit__graph} 13 13 \end{center} 14 14 \end{figure} … … 23 23 \begin{CompactItemize} 24 24 \item 25 \textbf{enorm} ({\bf RV} \&rv, vec \&mu, sq\_\-T \&R)\label{classenorm_183891111686898adef0f6ca292e600d} 25 \textbf{enorm} ({\bf RV} \&rv)\label{classenorm_7b5cb487a2570e8109bfdc0df149aa06} 26 27 \item 28 void \textbf{set\_\-parameters} (const vec \&{\bf mu}, const sq\_\-T \&{\bf R})\label{classenorm_1394a65caa6e00d42e00cc99b12227af} 26 29 27 30 \item … … 32 35 33 36 \item 34 void {\bf tupdate} ()\label{classenorm_2a1a522504c7788dfd7fb733157ee39e}35 36 \begin{CompactList}\small\item\em tupdate used in KF \item\end{CompactList}\item37 double {\bf dupdate} ()\label{classenorm_d1b0faf61260de09cf63bf823add5b32}38 39 \begin{CompactList}\small\item\em dupdate used in KF \item\end{CompactList}\item40 37 vec {\bf sample} () 41 38 \begin{CompactList}\small\item\em Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. \item\end{CompactList}\item … … 45 42 double {\bf eval} (const vec \&val)\label{classenorm_93107f05a8e9b34b64853767200121a4} 46 43 47 \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\end{CompactItemize} 48 \subsection*{Public Attributes} 44 \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item 45 double {\bf evalpdflog} (const vec \&val)\label{classenorm_9517594915e897584eaebbb057ed8881} 46 47 \begin{CompactList}\small\item\em Compute log-probability of argument {\tt val}. \item\end{CompactList}\item 48 vec {\bf mean} ()\label{classenorm_191c1220c3ddd0c5f54e78f19b57ebd5} 49 50 \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 51 vec $\ast$ {\bf \_\-mu} ()\label{classenorm_3be0cb541ec9b88e5aa3f60307bbc753} 52 53 \begin{CompactList}\small\item\em returns a pointer to the internal mean value. Use with Care! \item\end{CompactList}\item 54 void {\bf \_\-R} (sq\_\-T $\ast$\&pR, sq\_\-T $\ast$\&piR)\label{classenorm_8725c534863c4fc2bddef0edfb95a740} 55 56 \begin{CompactList}\small\item\em returns pointers to the internal variance and its inverse. Use with Care! \item\end{CompactList}\item 57 void {\bf \_\-cached} (bool what)\label{classenorm_c9ca4f2ca42568e40ca146168e7f3247} 58 59 \begin{CompactList}\small\item\em set cache as inconsistent \item\end{CompactList}\end{CompactItemize} 60 \subsection*{Protected Attributes} 49 61 \begin{CompactItemize} 50 62 \item 51 Normal\_\-RNG \textbf{RNG}\label{classenorm_a4de82a0d7ba9eaf31206318ae35d0d5} 63 vec {\bf mu}\label{classenorm_71fde0d54bba147e00f612577f95ad20} 64 65 \begin{CompactList}\small\item\em mean value \item\end{CompactList}\item 66 sq\_\-T {\bf R}\label{classenorm_4ccc8d8514d644ef1c98d8ab023748a1} 67 68 \begin{CompactList}\small\item\em Covariance matrix in decomposed form. \item\end{CompactList}\item 69 sq\_\-T {\bf \_\-iR}\label{classenorm_82f39ac49911d7097f4bfe385deba355} 70 71 \begin{CompactList}\small\item\em Cache: \_\-iR = inv(R);. \item\end{CompactList}\item 72 bool {\bf cached}\label{classenorm_ae12db77283a96e0f14a3eae93dc3bf1} 73 74 \begin{CompactList}\small\item\em indicator if {\tt \_\-iR} is chached \item\end{CompactList}\item 75 int {\bf dim}\label{classenorm_6938fc390a19cdaf6ad4503fcbaada4e} 76 77 \begin{CompactList}\small\item\em dimension (redundant from rv.count() for easier coding ) \item\end{CompactList}\item 78 {\bf RV} \textbf{rv}\label{classepdf_74da992e3f5d598da8850b646b79b9d9} 52 79 53 80 \end{CompactItemize} -
TabularUnified doc/latex/classepdf.tex ¶
r22 r32 10 10 \begin{center} 11 11 \leavevmode 12 \includegraphics[width= 67pt]{classepdf__inherit__graph}12 \includegraphics[width=179pt]{classepdf__inherit__graph} 13 13 \end{center} 14 14 \end{figure} … … 23 23 \begin{CompactItemize} 24 24 \item 25 {\bf epdf} ()\label{classepdf_d8eb760037b3bad5a0d64081606697cd} 26 27 \begin{CompactList}\small\item\em default constructor \item\end{CompactList}\item 28 {\bf epdf} (const {\bf RV} \&rv0)\label{classepdf_c95b1a27a8dd9507bb9a5a3cb2809c7a} 29 30 \begin{CompactList}\small\item\em default constructor \item\end{CompactList}\item 25 31 virtual vec {\bf sample} ()=0 26 32 \begin{CompactList}\small\item\em Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. \item\end{CompactList}\item 27 33 virtual double {\bf eval} (const vec \&val)\label{classepdf_f333ceeb88ebc37d81fcd4cea4526bfc} 28 34 29 \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\end{CompactItemize} 35 \begin{CompactList}\small\item\em Compute probability of argument {\tt val}. \item\end{CompactList}\item 36 virtual double {\bf evalpdflog} (const vec \&val)\label{classepdf_113c76c61d20e3f2a24ba322a73dfc51} 37 38 \begin{CompactList}\small\item\em Compute log-probability of argument {\tt val}. \item\end{CompactList}\item 39 virtual vec {\bf mean} ()=0\label{classepdf_5b61fae74d370d2216576d598c1a74ef} 40 41 \begin{CompactList}\small\item\em return expected value \item\end{CompactList}\item 42 virtual {\bf $\sim$epdf} ()\label{classepdf_0a322dd106f04c0a2915e3d4f4227396} 43 44 \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\end{CompactItemize} 45 \subsection*{Protected Attributes} 46 \begin{CompactItemize} 47 \item 48 {\bf RV} \textbf{rv}\label{classepdf_74da992e3f5d598da8850b646b79b9d9} 49 50 \end{CompactItemize} 30 51 31 52 … … 43 64 Returns a sample from the density, $x \sim epdf(rv)$ 44 65 45 Implemented in {\bf enorm$<$ sq\_\-T $>$} \doxyref{}{p.}{classenorm_6020bcd89db2c9584bd8871001bd2023} .66 Implemented in {\bf enorm$<$ sq\_\-T $>$} \doxyref{}{p.}{classenorm_6020bcd89db2c9584bd8871001bd2023}, {\bf egamma} \doxyref{}{p.}{classegamma_0a2186a586432c2c3f22d09c5341890f}, {\bf emix} \doxyref{}{p.}{classemix_3eb9a8e12ce1c5c8a3ddb245354b6941}, {\bf euni} \doxyref{}{p.}{classeuni_0f71562e3e919aba823cb7d9d420ad4c}, {\bf eEmp} \doxyref{}{p.}{classeEmp_c9b44099a400579b88aff9f5afaf9c13}, and {\bf enorm$<$ ldmat $>$} \doxyref{}{p.}{classenorm_6020bcd89db2c9584bd8871001bd2023}. 46 67 47 68 The documentation for this class was generated from the following file:\begin{CompactItemize} -
TabularUnified doc/latex/classfnc.tex ¶
r28 r32 21 21 int {\bf \_\-dimy} () const \label{classfnc_a8891973d0ca48ce38e1886df45ca298} 22 22 23 \begin{CompactList}\small\item\em access function \item\end{CompactList}\end{CompactItemize} 23 \begin{CompactList}\small\item\em access function \item\end{CompactList}\item 24 virtual {\bf $\sim$fnc} ()\label{classfnc_17164c202f6feee3d708b8caab6306ab} 25 26 \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\end{CompactItemize} 24 27 \subsection*{Protected Attributes} 25 28 \begin{CompactItemize} -
TabularUnified doc/latex/classfsqmat.tex ¶
r28 r32 28 28 29 29 \begin{CompactList}\small\item\em Conversion to full matrix. \item\end{CompactList}\item 30 void {\bf mult\_\-sym} (const mat \&C , bool trans=false)30 void {\bf mult\_\-sym} (const mat \&C) 31 31 \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE matrix \$C\$, i.e. \$V = C$\ast$V$\ast$C'\$. \item\end{CompactList}\item 32 void \textbf{mult\_\-sym} (const mat \&C, {\bf fsqmat} \&U, bool trans=false)\label{classfsqmat_ccf5ad8fb038f82e9d2201c0606b65fa} 32 void {\bf mult\_\-sym\_\-t} (const mat \&C) 33 \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE transpose of matrix \$C\$, i.e. \$V = C'$\ast$V$\ast$C\$. \item\end{CompactList}\item 34 void \textbf{mult\_\-sym} (const mat \&C, {\bf fsqmat} \&U)\label{classfsqmat_cfea3618d426e2b8232f09aa0070266f} 35 36 \item 37 void \textbf{mult\_\-sym\_\-t} (const mat \&C, {\bf fsqmat} \&U)\label{classfsqmat_7ca865c68989d22903efe97045cb6c9a} 33 38 34 39 \item … … 36 41 37 42 \begin{CompactList}\small\item\em Clearing matrix so that it corresponds to zeros. \item\end{CompactList}\item 43 {\bf fsqmat} ()\label{classfsqmat_79e3f73e0ccd663c7f7e08083d272940} 44 45 \begin{CompactList}\small\item\em Default initialization. \item\end{CompactList}\item 46 {\bf fsqmat} (const int dim0)\label{classfsqmat_40eae99305e7c7240fa95cfec125b06f} 47 48 \begin{CompactList}\small\item\em Default initialization with proper size. \item\end{CompactList}\item 38 49 {\bf fsqmat} (const mat \&M)\label{classfsqmat_1929fbc9fe375f1d67f979d0d302336f} 39 50 40 51 \begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 52 virtual {\bf $\sim$fsqmat} ()\label{classfsqmat_2a8f104e4befbc2aa90d8b11edfedb2e} 53 54 \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\item 41 55 virtual void {\bf inv} ({\bf fsqmat} \&Inv) 42 56 \begin{CompactList}\small\item\em Matrix inversion preserving the chosen form. \item\end{CompactList}\item 43 double {\bf logdet} () \label{classfsqmat_bf212272ec195ad2706e2bf4d8e7c9b3}57 double {\bf logdet} () const \label{classfsqmat_eb0d1358f536e4453b5f99d0418ca1e5} 44 58 45 59 \begin{CompactList}\small\item\em Logarithm of a determinant. \item\end{CompactList}\item 46 double {\bf qform} ( vec \&v)\label{classfsqmat_6d047b9f7a27dfc093303a13cc9b1fba}60 double {\bf qform} (const vec \&v)\label{classfsqmat_1eec8762a2299d83c7b7cd6bf6cbc1ad} 47 61 48 62 \begin{CompactList}\small\item\em Evaluates quadratic form \$x= v'$\ast$V$\ast$v\$;. \item\end{CompactList}\item 49 vec {\bf sqrt\_\-mult} ( vec \&v)63 vec {\bf sqrt\_\-mult} (const vec \&v) 50 64 \begin{CompactList}\small\item\em Multiplies square root of \$V\$ by vector \$x\$. \item\end{CompactList}\item 51 65 {\bf fsqmat} \& \textbf{operator+=} (const {\bf fsqmat} \&A)\label{classfsqmat_514d1fdd8a382dbd6a774f2cf1ebd3de} … … 73 87 74 88 \end{CompactItemize} 89 \subsection*{Friends} 90 \begin{CompactItemize} 91 \item 92 std::ostream \& \textbf{operator$<$$<$} (std::ostream \&os, const {\bf fsqmat} \&sq)\label{classfsqmat_e06aba54d61e807b41bd68b5ee6ac22f} 93 94 \end{CompactItemize} 75 95 76 96 … … 95 115 Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_b223484796661f2dadb5607a86ce0581}.\index{fsqmat@{fsqmat}!mult_sym@{mult\_\-sym}} 96 116 \index{mult_sym@{mult\_\-sym}!fsqmat@{fsqmat}} 97 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::mult\_\-sym (const mat \& {\em C} , bool {\em trans} = {\tt false})\hspace{0.3cm}{\tt [virtual]}}\label{classfsqmat_acc5d2d0a243f1de6d0106065f01f518}117 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::mult\_\-sym (const mat \& {\em C})\hspace{0.3cm}{\tt [virtual]}}\label{classfsqmat_5530d2756b5d991de755e6121c9a452e} 98 118 99 119 … … 103 123 \item[Parameters:] 104 124 \begin{description} 105 \item[{\em C}]multiplying matrix, \ item[{\em trans}]if true, product \$V = C'$\ast$V$\ast$C\$ will be computed instead; \end{description}125 \item[{\em C}]multiplying matrix, \end{description} 106 126 \end{Desc} 107 127 108 128 109 Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_faa3bc90be142adde9cf74f573c70157}.\index{fsqmat@{fsqmat}!inv@{inv}} 129 Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_60fbbfa9e483b8187c135f787ee53afa}.\index{fsqmat@{fsqmat}!mult_sym_t@{mult\_\-sym\_\-t}} 130 \index{mult_sym_t@{mult\_\-sym\_\-t}!fsqmat@{fsqmat}} 131 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::mult\_\-sym\_\-t (const mat \& {\em C})\hspace{0.3cm}{\tt [virtual]}}\label{classfsqmat_92052a8adc2054b63e42d1373d145c89} 132 133 134 Inplace symmetric multiplication by a SQUARE transpose of matrix \$C\$, i.e. \$V = C'$\ast$V$\ast$C\$. 135 136 \begin{Desc} 137 \item[Parameters:] 138 \begin{description} 139 \item[{\em C}]multiplying matrix, \end{description} 140 \end{Desc} 141 142 143 Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_6909e906da17725b1b80f3cae7cf3325}.\index{fsqmat@{fsqmat}!inv@{inv}} 110 144 \index{inv@{inv}!fsqmat@{fsqmat}} 111 145 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}void fsqmat::inv ({\bf fsqmat} \& {\em Inv})\hspace{0.3cm}{\tt [virtual]}}\label{classfsqmat_9fa853e1ca28f2a1a1c43377e798ecb1} … … 121 155 \index{fsqmat@{fsqmat}!sqrt_mult@{sqrt\_\-mult}} 122 156 \index{sqrt_mult@{sqrt\_\-mult}!fsqmat@{fsqmat}} 123 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vec fsqmat::sqrt\_\-mult ( vec \& {\em v})\hspace{0.3cm}{\tt [inline, virtual]}}\label{classfsqmat_6648dd4291b809cce14e8497d0433ad3}157 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}vec fsqmat::sqrt\_\-mult (const vec \& {\em v})\hspace{0.3cm}{\tt [inline, virtual]}}\label{classfsqmat_2288389e2d47bd9df112815ef570c5c9} 124 158 125 159 … … 128 162 Used e.g. in generating normal samples. 129 163 130 Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_ b5236c8a050199e1a9d338b0da1a08d2}.164 Implements {\bf sqmat} \doxyref{}{p.}{classsqmat_975ddc7e8035d8d4e6cbd52dd99c248c}. 131 165 132 166 The documentation for this class was generated from the following files:\begin{CompactItemize} -
TabularUnified doc/latex/classmpdf.tex ¶
r19 r32 17 17 \begin{center} 18 18 \leavevmode 19 \includegraphics[width= 43pt]{classmpdf__coll__graph}19 \includegraphics[width=60pt]{classmpdf__coll__graph} 20 20 \end{center} 21 21 \end{figure} … … 25 25 virtual vec {\bf samplecond} (vec \&cond, double lik) 26 26 \begin{CompactList}\small\item\em Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. \item\end{CompactList}\item 27 virtual void \textbf{condition} ( vec \&cond)\label{classmpdf_cfb3dffef7c03598622e414668bb0588}27 virtual void \textbf{condition} (const vec \&cond)\label{classmpdf_0f95a0cc6ab40611f46804682446ed83} 28 28 29 \end{CompactItemize} 29 \item 30 virtual double \textbf{evalcond} (const vec \&dt, const vec \&cond)\label{classmpdf_80b738ece5bd4f8c4edaee4b38906f91} 31 32 \item 33 virtual {\bf $\sim$mpdf} ()\label{classmpdf_6788be9f3a888796499c5293a318fcfb} 34 35 \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\item 36 {\bf mpdf} (const {\bf RV} \&rv0, const {\bf RV} \&rvc0)\label{classmpdf_581ecf362185d37c08bb31cb9d046d6f} 37 38 \begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\end{CompactItemize} 39 \subsection*{Protected Attributes} 40 \begin{CompactItemize} 41 \item 42 {\bf RV} {\bf rv}\label{classmpdf_f6687c07ff07d47812dd565368ca59eb} 43 44 \begin{CompactList}\small\item\em modeled random variable \item\end{CompactList}\item 45 {\bf RV} {\bf rvc}\label{classmpdf_acb7dda792b3cd5576f39fa3129abbab} 46 47 \begin{CompactList}\small\item\em random variable in condition \item\end{CompactList}\item 48 {\bf epdf} $\ast$ {\bf ep}\label{classmpdf_7aa894208a32f3487827df6d5054424c} 49 50 \begin{CompactList}\small\item\em pointer to internal \doxyref{epdf}{p.}{classepdf} \item\end{CompactList}\end{CompactItemize} 30 51 31 52 … … 41 62 Returns the required moment of the \doxyref{epdf}{p.}{classepdf}. 42 63 43 Returns a sample from the density conditioned on {\tt cond}, \$x \doxyref{epdf}{p.}{classepdf}(rv$|$cond)\$ 64 Returns a sample from the density conditioned on {\tt cond}, \$x \doxyref{epdf}{p.}{classepdf}(rv$|$cond)\$. \begin{Desc} 65 \item[Parameters:] 66 \begin{description} 67 \item[{\em lik}]is a return value of likelihood of the sample. \end{description} 68 \end{Desc} 69 44 70 45 71 The documentation for this class was generated from the following file:\begin{CompactItemize} -
TabularUnified doc/latex/classsqmat.tex ¶
r22 r32 21 21 22 22 \begin{CompactList}\small\item\em Conversion to full matrix. \item\end{CompactList}\item 23 virtual void {\bf mult\_\-sym} (const mat \&C , bool trans=true)=023 virtual void {\bf mult\_\-sym} (const mat \&C)=0 24 24 \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE matrix \$C\$, i.e. \$V = C$\ast$V$\ast$C'\$. \item\end{CompactList}\item 25 virtual double {\bf logdet} ()=0\label{classsqmat_5c852819589f74cdaefbd648c0ce8547} 25 virtual void {\bf mult\_\-sym\_\-t} (const mat \&C)=0 26 \begin{CompactList}\small\item\em Inplace symmetric multiplication by a SQUARE transpose of matrix \$C\$, i.e. \$V = C'$\ast$V$\ast$C\$. \item\end{CompactList}\item 27 virtual double {\bf logdet} () const =0\label{classsqmat_0a772b396750eeeed85d69fa72478b45} 26 28 27 29 \begin{CompactList}\small\item\em Logarithm of a determinant. \item\end{CompactList}\item 28 virtual vec {\bf sqrt\_\-mult} ( vec \&v)=030 virtual vec {\bf sqrt\_\-mult} (const vec \&v)=0 29 31 \begin{CompactList}\small\item\em Multiplies square root of \$V\$ by vector \$x\$. \item\end{CompactList}\item 30 virtual double {\bf qform} ( vec \&v)=0\label{classsqmat_44e079468bc8bfccf634dc85b32ba6be}32 virtual double {\bf qform} (const vec \&v)=0\label{classsqmat_90f97cdf9de08ead4f0648419b3aa4ce} 31 33 32 34 \begin{CompactList}\small\item\em Evaluates quadratic form \$x= v'$\ast$V$\ast$v\$;. \item\end{CompactList}\item … … 39 41 int {\bf rows} () const \label{classsqmat_071e80ced9cc3b8cbb360fa7462eb646} 40 42 41 \begin{CompactList}\small\item\em Reimplementing common functions of mat: \doxyref{cols()}{p.}{classsqmat_ecc2e2540f95a04f4449842588170f5b}. \item\end{CompactList}\end{CompactItemize} 43 \begin{CompactList}\small\item\em Reimplementing common functions of mat: \doxyref{cols()}{p.}{classsqmat_ecc2e2540f95a04f4449842588170f5b}. \item\end{CompactList}\item 44 virtual {\bf $\sim$sqmat} ()\label{classsqmat_0481f2067bb32aaea7e6d4f27e46b656} 45 46 \begin{CompactList}\small\item\em Destructor for future use;. \item\end{CompactList}\end{CompactItemize} 42 47 \subsection*{Protected Attributes} 43 48 \begin{CompactItemize} … … 68 73 Implemented in {\bf fsqmat} \doxyref{}{p.}{classfsqmat_b36530e155667fe9f1bd58394e50c65a}.\index{sqmat@{sqmat}!mult_sym@{mult\_\-sym}} 69 74 \index{mult_sym@{mult\_\-sym}!sqmat@{sqmat}} 70 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void sqmat::mult\_\-sym (const mat \& {\em C} , bool {\em trans} = {\tt true})\hspace{0.3cm}{\tt [pure virtual]}}\label{classsqmat_faa3bc90be142adde9cf74f573c70157}75 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void sqmat::mult\_\-sym (const mat \& {\em C})\hspace{0.3cm}{\tt [pure virtual]}}\label{classsqmat_60fbbfa9e483b8187c135f787ee53afa} 71 76 72 77 … … 76 81 \item[Parameters:] 77 82 \begin{description} 78 \item[{\em C}]multiplying matrix, \ item[{\em trans}]if true, product \$V = C'$\ast$V$\ast$C\$ will be computed instead; \end{description}83 \item[{\em C}]multiplying matrix, \end{description} 79 84 \end{Desc} 80 85 81 86 82 Implemented in {\bf fsqmat} \doxyref{}{p.}{classfsqmat_acc5d2d0a243f1de6d0106065f01f518}.\index{sqmat@{sqmat}!sqrt_mult@{sqrt\_\-mult}} 87 Implemented in {\bf fsqmat} \doxyref{}{p.}{classfsqmat_5530d2756b5d991de755e6121c9a452e}.\index{sqmat@{sqmat}!mult_sym_t@{mult\_\-sym\_\-t}} 88 \index{mult_sym_t@{mult\_\-sym\_\-t}!sqmat@{sqmat}} 89 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void sqmat::mult\_\-sym\_\-t (const mat \& {\em C})\hspace{0.3cm}{\tt [pure virtual]}}\label{classsqmat_6909e906da17725b1b80f3cae7cf3325} 90 91 92 Inplace symmetric multiplication by a SQUARE transpose of matrix \$C\$, i.e. \$V = C'$\ast$V$\ast$C\$. 93 94 \begin{Desc} 95 \item[Parameters:] 96 \begin{description} 97 \item[{\em C}]multiplying matrix, \end{description} 98 \end{Desc} 99 100 101 Implemented in {\bf fsqmat} \doxyref{}{p.}{classfsqmat_92052a8adc2054b63e42d1373d145c89}.\index{sqmat@{sqmat}!sqrt_mult@{sqrt\_\-mult}} 83 102 \index{sqrt_mult@{sqrt\_\-mult}!sqmat@{sqmat}} 84 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual vec sqmat::sqrt\_\-mult ( vec \& {\em v})\hspace{0.3cm}{\tt [pure virtual]}}\label{classsqmat_b5236c8a050199e1a9d338b0da1a08d2}103 \subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual vec sqmat::sqrt\_\-mult (const vec \& {\em v})\hspace{0.3cm}{\tt [pure virtual]}}\label{classsqmat_975ddc7e8035d8d4e6cbd52dd99c248c} 85 104 86 105 … … 89 108 Used e.g. in generating normal samples. 90 109 91 Implemented in {\bf fsqmat} \doxyref{}{p.}{classfsqmat_ 6648dd4291b809cce14e8497d0433ad3}.110 Implemented in {\bf fsqmat} \doxyref{}{p.}{classfsqmat_2288389e2d47bd9df112815ef570c5c9}. 92 111 93 112 The documentation for this class was generated from the following file:\begin{CompactItemize} -
TabularUnified doc/latex/doxygen.sty ¶
r28 r32 11 11 \rhead[\fancyplain{}{\bfseries\leftmark}] 12 12 {\fancyplain{}{\bfseries\thepage}} 13 \rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Mon Feb 18 21:48:39 2008 for mixpp by Doxygen }]{}14 \lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Mon Feb 18 21:48:39 2008 for mixpp by Doxygen }}13 \rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Thu Feb 28 16:54:39 2008 for mixpp by Doxygen }]{} 14 \lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Thu Feb 28 16:54:39 2008 for mixpp by Doxygen }} 15 15 \cfoot{} 16 16 \newenvironment{Code} -
TabularUnified doc/latex/hierarchy.tex ¶
r22 r32 4 4 \begin{CompactList} 5 5 \item \contentsline{section}{Kalman$<$ sq\_\-T $>$}{\pageref{classKalman}}{} 6 \item \contentsline{section}{Kalman$<$ fsqmat $>$}{\pageref{classKalman}}{}6 \item \contentsline{section}{Kalman$<$ ldmat $>$}{\pageref{classKalman}}{} 7 7 \begin{CompactList} 8 8 \item \contentsline{section}{EKF$<$ sq\_\-T $>$}{\pageref{classEKF}}{} 9 \item \contentsline{section}{KFcondQR}{\pageref{classKFcondQR}}{} 9 10 \end{CompactList} 10 \item \contentsline{section}{KalmanFull}{\pageref{classKalmanFull}}{}11 11 \item \contentsline{section}{PF}{\pageref{classPF}}{} 12 12 \begin{CompactList} 13 \item \contentsline{section}{ TrivialPF}{\pageref{classTrivialPF}}{}13 \item \contentsline{section}{MPF$<$ BM\_\-T $>$}{\pageref{classMPF}}{} 14 14 \end{CompactList} 15 \end{CompactList} 16 \item \contentsline{section}{BMcond}{\pageref{classBMcond}}{} 17 \begin{CompactList} 18 \item \contentsline{section}{KFcondQR}{\pageref{classKFcondQR}}{} 15 19 \end{CompactList} 16 20 \item \contentsline{section}{DS}{\pageref{classDS}}{} … … 22 26 \item \contentsline{section}{eEF}{\pageref{classeEF}}{} 23 27 \begin{CompactList} 28 \item \contentsline{section}{egamma}{\pageref{classegamma}}{} 24 29 \item \contentsline{section}{enorm$<$ sq\_\-T $>$}{\pageref{classenorm}}{} 30 \item \contentsline{section}{enorm$<$ ldmat $>$}{\pageref{classenorm}}{} 25 31 \end{CompactList} 32 \item \contentsline{section}{eEmp}{\pageref{classeEmp}}{} 33 \item \contentsline{section}{emix}{\pageref{classemix}}{} 34 \item \contentsline{section}{euni}{\pageref{classeuni}}{} 26 35 \end{CompactList} 27 36 \item \contentsline{section}{fnc}{\pageref{classfnc}}{} … … 34 43 \item \contentsline{section}{linfn}{\pageref{classlinfn}}{} 35 44 \end{CompactList} 45 \item \contentsline{section}{itpp::Gamma\_\-RNG}{\pageref{classitpp_1_1Gamma__RNG}}{} 46 \item \contentsline{section}{KalmanFull}{\pageref{classKalmanFull}}{} 47 \item \contentsline{section}{mgamma}{\pageref{classmgamma}}{} 48 \item \contentsline{section}{mlnorm$<$ sq\_\-T $>$}{\pageref{classmlnorm}}{} 36 49 \item \contentsline{section}{mpdf}{\pageref{classmpdf}}{} 37 50 \item \contentsline{section}{RV}{\pageref{classRV}}{} -
TabularUnified doc/latex/libBM_8h.tex ¶
r22 r32 19 19 \begin{center} 20 20 \leavevmode 21 \includegraphics[width= 361pt]{libBM_8h__dep__incl}21 \includegraphics[width=272pt]{libBM_8h__dep__incl} 22 22 \end{center} 23 23 \end{figure} … … 29 29 class {\bf fnc} 30 30 \begin{CompactList}\small\item\em Class representing function \$f(x)\$ of variable \$x\$ represented by {\tt rv}. \item\end{CompactList}\item 31 class {\bf BM}32 \begin{CompactList}\small\item\em Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. \item\end{CompactList}\item33 31 class {\bf epdf} 34 32 \begin{CompactList}\small\item\em Probability density function with numerical statistics, e.g. posterior density. \item\end{CompactList}\item … … 36 34 \begin{CompactList}\small\item\em Conditional probability density, e.g. modeling some dependencies. \item\end{CompactList}\item 37 35 class {\bf DS} 38 \begin{CompactList}\small\item\em Abstract class for discrete-time sources of data. \item\end{CompactList}\end{CompactItemize} 36 \begin{CompactList}\small\item\em Abstract class for discrete-time sources of data. \item\end{CompactList}\item 37 class {\bf BM} 38 \begin{CompactList}\small\item\em Bayesian Model of the world, i.e. all uncertainty is modeled by probabilities. \item\end{CompactList}\item 39 class {\bf BMcond} 40 \begin{CompactList}\small\item\em Conditional Bayesian Filter. \item\end{CompactList}\end{CompactItemize} 39 41 40 42 -
TabularUnified doc/latex/libDC_8h.tex ¶
r19 r32 19 19 \begin{center} 20 20 \leavevmode 21 \includegraphics[width= 276pt]{libDC_8h__dep__incl}21 \includegraphics[width=191pt]{libDC_8h__dep__incl} 22 22 \end{center} 23 23 \end{figure} -
TabularUnified doc/latex/libEF_8h.tex ¶
r22 r32 6 6 {\tt \#include \char`\"{}../math/libDC.h\char`\"{}}\par 7 7 {\tt \#include \char`\"{}libBM.h\char`\"{}}\par 8 {\tt \#include \char`\"{}../itpp\_\-ext.h\char`\"{}}\par 8 9 9 10 … … 12 13 \begin{center} 13 14 \leavevmode 14 \includegraphics[width=116pt]{libEF_8h__incl} 15 \includegraphics[width=157pt]{libEF_8h__incl} 16 \end{center} 17 \end{figure} 18 19 20 This graph shows which files directly or indirectly include this file:\nopagebreak 21 \begin{figure}[H] 22 \begin{center} 23 \leavevmode 24 \includegraphics[width=191pt]{libEF_8h__dep__incl} 15 25 \end{center} 16 26 \end{figure} … … 24 34 class {\bf enorm$<$ sq\_\-T $>$} 25 35 \begin{CompactList}\small\item\em Gaussian density with positive definite (decomposed) covariance matrix. \item\end{CompactList}\item 26 class \textbf{mlnorm$<$ sq\_\-T $>$} 36 class {\bf egamma} 37 \begin{CompactList}\small\item\em Gamma posterior density. \item\end{CompactList}\item 38 class {\bf emix} 39 \begin{CompactList}\small\item\em Weighted mixture of epdfs with external owned components. \item\end{CompactList}\item 40 class {\bf euni} 41 \begin{CompactList}\small\item\em Uniform distributed density on a rectangular support. \item\end{CompactList}\item 42 class {\bf mlnorm$<$ sq\_\-T $>$} 43 \begin{CompactList}\small\item\em Normal distributed linear function with linear function of mean value;. \item\end{CompactList}\item 44 class {\bf mgamma} 45 \begin{CompactList}\small\item\em Gamma random walk. \item\end{CompactList}\item 46 class {\bf eEmp} 47 \begin{CompactList}\small\item\em Weighted empirical density. \item\end{CompactList}\end{CompactItemize} 48 \subsection*{Enumerations} 49 \begin{CompactItemize} 50 \item 51 enum {\bf RESAMPLING\_\-METHOD} \{ \textbf{MULTINOMIAL} = 0, 52 \textbf{STRATIFIED} = 1, 53 \textbf{SYSTEMATIC} = 3 54 \} 55 \begin{CompactList}\small\item\em Switch between various resampling methods. \item\end{CompactList}\end{CompactItemize} 56 \subsection*{Variables} 57 \begin{CompactItemize} 58 \item 59 Uniform\_\-RNG {\bf UniRNG}\label{libEF_8h_2ae7dcdfebede774dd1b1f16cad10dd9} 60 61 \begin{CompactList}\small\item\em Global Uniform\_\-RNG. \item\end{CompactList}\item 62 Normal\_\-RNG \textbf{NorRNG}\label{libEF_8h_395c5925c8792aef3be4c360e91526c0} 63 64 \item 65 {\bf Gamma\_\-RNG} \textbf{GamRNG}\label{libEF_8h_884a8348c92a49725b78e2b6ab0bb802} 66 27 67 \end{CompactItemize} 28 68 -
TabularUnified doc/latex/libKF_8h.tex ¶
r22 r32 5 5 {\tt \#include $<$itpp/itbase.h$>$}\par 6 6 {\tt \#include \char`\"{}../stat/libFN.h\char`\"{}}\par 7 {\tt \#include \char`\"{}../ math/libDC.h\char`\"{}}\par7 {\tt \#include \char`\"{}../stat/libEF.h\char`\"{}}\par 8 8 9 9 … … 12 12 \begin{center} 13 13 \leavevmode 14 \includegraphics[width= 134pt]{libKF_8h__incl}14 \includegraphics[width=203pt]{libKF_8h__incl} 15 15 \end{center} 16 16 \end{figure} … … 23 23 \begin{CompactList}\small\item\em \doxyref{Kalman}{p.}{classKalman} filter with covariance matrices in square root form. \item\end{CompactList}\item 24 24 class {\bf EKF$<$ sq\_\-T $>$} 25 \begin{CompactList}\small\item\em Extended \doxyref{Kalman}{p.}{classKalman} Filter. \item\end{CompactList}\end{CompactItemize} 25 \begin{CompactList}\small\item\em Extended \doxyref{Kalman}{p.}{classKalman} Filter. \item\end{CompactList}\item 26 class {\bf KFcondQR} 27 \begin{CompactList}\small\item\em \doxyref{Kalman}{p.}{classKalman} Filter with conditional diagonal matrices R and Q. \item\end{CompactList}\end{CompactItemize} 26 28 27 29 -
TabularUnified doc/latex/libPF_8h.tex ¶
r19 r32 4 4 5 5 {\tt \#include $<$itpp/itbase.h$>$}\par 6 {\tt \#include \char`\"{}../stat/lib BM.h\char`\"{}}\par6 {\tt \#include \char`\"{}../stat/libEF.h\char`\"{}}\par 7 7 {\tt \#include \char`\"{}../math/libDC.h\char`\"{}}\par 8 8 … … 12 12 \begin{center} 13 13 \leavevmode 14 \includegraphics[width=1 35pt]{libPF_8h__incl}14 \includegraphics[width=182pt]{libPF_8h__incl} 15 15 \end{center} 16 16 \end{figure} … … 19 19 \item 20 20 class {\bf PF} 21 \begin{CompactList}\small\item\em A Particle Filter prototype. \item\end{CompactList}\item 22 class {\bf TrivialPF} 23 \begin{CompactList}\small\item\em Trivial particle filter with proposal density that is not conditioned on the data. \item\end{CompactList}\item 24 class \textbf{MPF} 25 \end{CompactItemize} 26 \subsection*{Enumerations} 27 \begin{CompactItemize} 28 \item 29 enum \textbf{RESAMPLING\_\-METHOD} \{ \textbf{MULTINOMIAL} = 0, 30 \textbf{STRATIFIED} = 1, 31 \textbf{SYSTEMATIC} = 3 32 \} 33 \end{CompactItemize} 21 \begin{CompactList}\small\item\em Trivial particle filter with proposal density equal to parameter evolution model. \item\end{CompactList}\item 22 class {\bf MPF$<$ BM\_\-T $>$} 23 \begin{CompactList}\small\item\em Marginalized Particle filter. \item\end{CompactList}\end{CompactItemize} 34 24 35 25 -
TabularUnified doc/latex/refman.tex ¶
r28 r32 21 21 {\large Generated by Doxygen 1.5.3}\\ 22 22 \vspace*{0.5cm} 23 {\small Mon Feb 18 21:48:39 2008}\\23 {\small Thu Feb 28 16:54:39 2008}\\ 24 24 \end{center} 25 25 \end{titlepage} … … 40 40 \input{classbilinfn} 41 41 \include{classBM} 42 \include{classBMcond} 42 43 \include{classconstfn} 43 44 \include{classdiffbifn} 44 45 \include{classDS} 45 46 \include{classeEF} 47 \include{classeEmp} 48 \include{classegamma} 46 49 \include{classEKF} 50 \include{classemix} 47 51 \include{classenorm} 48 52 \include{classepdf} 53 \include{classeuni} 49 54 \include{classfnc} 50 55 \include{classfsqmat} 56 \include{classitpp_1_1Gamma__RNG} 51 57 \include{classKalman} 52 58 \include{classKalmanFull} 59 \include{classKFcondQR} 53 60 \include{classlinfn} 54 61 \include{classMemDS} 62 \include{classmgamma} 63 \include{classmlnorm} 55 64 \include{classmpdf} 65 \include{classMPF} 56 66 \include{classPF} 57 67 \include{classRV} 58 68 \include{classsqmat} 59 \include{classTrivialPF}60 69 \chapter{mixpp File Documentation} 61 70 \input{libKF_8h} -
TabularUnified matlab/testKF.m ¶
r22 r32 7 7 C=[1 0]; 8 8 D=[0]; 9 R=[ 0.1];9 R=[1]; 10 10 Q=[0.2 0 ; 0 0.02]; 11 11 … … 17 17 P0 = 200*eye(2); 18 18 19 u = ones(1,N);19 u = zeros(1,N); 20 20 x = zeros(2,N); 21 21 y = zeros(1,N); 22 22 23 23 x(:,1) = [10;10]; 24 Et = sQ*randn(2,N); 25 Wt = sR*randn(1,N); 24 26 for i=2:N; 25 et(1:2,i) = sQ*randn(2,1); 26 x(:,i) = A*x(:,i-1) + B*u(i) + et(:,i); 27 y(:,i) = C*x(:,i) + D*u(i) + sR*randn(1,1); 27 x(:,i) = A*x(:,i-1) + B*u(i) + Et(:,i); 28 y(:,i) = C*x(:,i) + D*u(i) + Wt(:,1); 28 29 end 29 30 … … 39 40 EP = [0;0]; 40 41 42 Oxt = mu0; 43 OPt = P0; 44 ll =0; 45 Oxt2 = mu0; 46 OPt2 = P0; 47 ll2=0; 48 49 41 50 for t=2:N 42 51 mu = A*mu + B*u(t); … … 50 59 mu = mu + K*(y(t)-C*mu-D*u(t)); 51 60 Mu(1:2,t)=mu; 61 62 [Oxt,OPt,ll(t)] = Kalman(Oxt,y(t),A,C,Q,R,OPt); 63 [Oxt2,OPt2,ll2(t)] = Kalman(Oxt2,y(t),A,C,Q,R/10000,OPt2); 52 64 end 65 66 keyboard 53 67 54 68 !cd ../;./tests/testKF -
TabularUnified tests/CMakeLists.txt ¶
r22 r32 6 6 7 7 ## Save all needed libraries in variable BdmLibs 8 SET(BdmLibs bdm itpp) 8 SET(BdmLibs bdm itpp_debug) 9 #SET(BdmLibs bdm itpp) 9 10 10 11 IF(WIN32) … … 23 24 add_executable (testPF testPF.cpp) 24 25 add_executable (testSmp testSmp.cpp) 26 add_executable (testEpdf testEpdf.cpp) 27 add_executable (testResample testResample.cpp) 28 add_executable (testKF_QR testKF_QR.cpp) 25 29 26 30 # Link the executable to the Hello library. … … 29 33 target_link_libraries (testPF ${BdmLibs}) 30 34 target_link_libraries (testSmp ${BdmLibs}) 35 target_link_libraries (testEpdf ${BdmLibs}) 36 target_link_libraries (testResample ${BdmLibs}) 37 target_link_libraries (testKF_QR ${BdmLibs}) -
TabularUnified tests/test0.cpp ¶
r28 r32 12 12 { 13 13 14 RV th = RV ( "1 2","{a b }","1 1","0 0" ,"0 0");14 RV th = RV ( "1 2","{a b }","1 1","0 0"); 15 15 RV r = RV ( "3 4" ); 16 16 17 17 cout << th << r << endl; 18 18 19 ldmat ld = ldmat("1 0; -0.11","1.1 1.3");19 ldmat ld = ldmat("1 0;0.5 1","1.1 1.3"); 20 20 vec v = "1 -0.1"; 21 21 -
TabularUnified tests/testKF.cpp ¶
r28 r32 18 18 it_file fin( "testKF.it" ); 19 19 20 mat Dt, Xt,Xt2,XtE ;20 mat Dt, Xt,Xt2,XtE,Xtf; 21 21 int Ndat; 22 22 … … 42 42 Xt=zeros( 2,Ndat ); 43 43 Xt2=zeros( 2,Ndat ); 44 Xtf=zeros( 2,Ndat ); 44 45 XtE=zeros( 2,Ndat ); 45 46 46 47 // cout << KF; 47 RV rx("1","{x}","2","0" ,"0");48 RV ru("2","{u}","1","0" ,"0");49 RV ry("3","{y}","1","0" ,"0");48 RV rx("1","{x}","2","0"); 49 RV ru("2","{u}","1","0"); 50 RV ry("3","{y}","1","0"); 50 51 // 51 52 Kalman<ldmat> KF(rx,ry,ru); … … 65 66 KFE.set_est(mu0,P0); 66 67 67 Xt.set_col( 0,*((enorm<ldmat>*)(KF._epdf()))->_mu() ); 68 epdf& KFep = KF._epdf(); 69 epdf& KFfep = KFf._epdf(); 70 epdf& KFEep = KFE._epdf(); 71 72 Xt.set_col( 0,KFep.mean() ); 73 Xtf.set_col( 0,KFfep.mean() ); 68 74 Xt2.set_col( 0,KF2.mu ); 69 XtE.set_col( 0, *((enorm<ldmat>*)(KFE._epdf()))->_mu() );75 XtE.set_col( 0,KFEep.mean() ); 70 76 for ( int t=1;t<Ndat;t++ ) { 71 77 KFf.bayes( Dt.get_col( t )); 72 78 KF.bayes( Dt.get_col( t )); 73 79 KF2.bayes( Dt.get_col( t )); 74 // KFE.bayes( Dt.get_col( t )); 75 Xt.set_col(t,*((enorm<ldmat>*)(KF._epdf()))->_mu()); 80 KFE.bayes( Dt.get_col( t )); 81 Xt.set_col( t,KFep.mean() ); 82 Xtf.set_col( t,KFfep.mean() ); 76 83 Xt2.set_col(t,KF2.mu); 77 XtE.set_col( t,*((enorm<ldmat>*)(KFE._epdf()))->_mu());84 XtE.set_col( t,KFEep.mean() ); 78 85 } 79 86 80 87 it_file fou( "testKF_res.it" ); 81 88 fou << Name("xth") << Xt; 89 fou << Name("xthf") << Xtf; 82 90 fou << Name("xth2") << Xt2; 83 91 fou << Name("xthE") << XtE; -
TabularUnified tests/testPF.cpp ¶
r19 r32 13 13 14 14 RV x("1"); 15 RV xm=x; xm.t(-1); 15 RV xm=x; xm.t(-1);const 16 16 RV y("2"); 17 17 … … 19 19 vec vR = "1"; 20 20 ldmat R(vR); 21 22 eEmp emp(x,10); 23 euni eun(x); 24 eun.set_parameters("0","1"); 25 emp.set_parameters(ones(10),&eun); 26 vec &v=emp._w(); 27 Array<vec> &S=emp._samples(); 21 28 29 for (int i=0;i<10;i++){ v(i) = exp(-0.5*sum(pow(S(i)-1,2.0))*10);} 30 v/=sum(v); 22 31 23 vec ptc = randn(10);24 vec w = exp(-0.5*(pow(ptc,2))/0.2);32 cout << "p:" << S << endl; 33 cout << "w:" << v << endl; 25 34 26 cout << "p:" << ptc << endl; 27 cout << "w:" << w << endl; 28 29 PF pf(w); 30 ivec ind = pf.resample(); 35 ivec ind = emp.resample(); 31 36 32 37 cout << ind << endl; 33 /*34 mlnorm<ldmat> obs(x,xm,A,R);35 mlnorm<ldmat> par(y,x,A,R);36 38 37 TrivialPF TPF(obs,par,10);38 */39 39 //Exit program: 40 40 return 0; -
TabularUnified tests/testSmp.cpp ¶
r28 r32 8 8 using std::endl; 9 9 10 void disp(const vec &tmu, const mat &tR,const mat &Smp){ 11 int N = Smp.cols(); 12 vec Emu = Smp*ones(N) /N ; 13 mat Er = (Smp*Smp.transpose())/N - outer_product(Emu,Emu); 14 cout << "True mu:" << tmu <<endl; 15 cout << "Emp mu:" << Emu <<endl; 16 17 cout << "True R:" << tR <<endl; 18 cout << "Emp R:" << Er <<endl; 19 } 20 10 21 int main() { 11 22 12 //RNG_randomize();23 RNG_randomize(); 13 24 14 RV rv("1","{x }","2","0" ,"0");25 RV rv("1","{x }","2","0"); 15 26 int N = 10000; //number of samples 16 27 vec mu0 = "1.5 1.7"; 17 28 mat V0("1.2 0.3; 0.3 5"); 18 29 ldmat R = ldmat(V0); 30 31 cout << "====== ENorm ====== " <<endl; 19 32 enorm<ldmat> eN(rv); 20 33 eN.set_parameters(mu0,R); 34 mat Smp = eN.sample(N); 35 36 disp(mu0,R.to_mat(),Smp); 37 38 cout << "====== MlNorm ====== " <<endl; 39 mat I = eye(2); 40 vec lik(N); 41 mlnorm<ldmat> ML(rv,rv); 42 ML.set_parameters(I,R); 43 Smp = ML.samplecond(mu0,lik,N); 21 44 22 mat Smp = eN.sample(N); 23 cout << "True:" <<endl; 24 cout << "mu:" << mu0 ; 25 cout << "R:" << R ; 26 cout << "R:" << R.to_mat() ; 45 disp(mu0,R.to_mat(),Smp); 46 47 cout << "====== EGamma ====== " <<endl; 48 vec a = "100000,10000"; 49 vec b = a/10.0; 50 egamma eG(rv); 51 eG.set_parameters(a,b); 27 52 28 vec Emu = Smp*ones(N) /N ; 29 cout << "Empirical:" <<endl; 30 cout << "mu:" << Emu; 31 cout << "R:" << (Smp*Smp.transpose())/N - Emu*Emu.transpose() <<endl; 53 Smp = eG.sample(N); 54 55 vec g_mu = elem_div(a,b); 56 vec g_var = elem_div(a,pow(b,2.0)); 57 disp(g_mu,diag(g_var),Smp); 58 59 cout << "====== MGamma ====== " <<endl; 60 mgamma mG(rv,rv); 61 double k = 10.0; 62 mG.set_parameters(k); 63 64 Smp=mG.samplecond(mu0,lik,N); 65 disp(mu0,pow(mu0,2.0)/k,Smp); 32 66 33 67 //Exit program: … … 35 69 36 70 } 71