- Timestamp:
- 02/24/09 14:12:19 (15 years ago)
- Location:
- bdm
- Files:
-
- 6 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/estim/ekf_templ.h
r254 r279 22 22 public: 23 23 //! Default constructor 24 EKFful_unQR ( RV rx, RV ry,RV ru,RV rQR ) :EKFfull ( rx,ry,ru ),BMcond ( rQR) {};24 EKFful_unQR ( ) :EKFfull ( ),BMcond ( ) {}; 25 25 void condition ( const vec &QR0 ) { 26 26 Q=diag(QR0(0,dimx-1)); … … 33 33 public: 34 34 //! Default constructor 35 EKFCh_unQ ( RV rx, RV ry,RV ru,RV rQ ) :EKFCh ( rx,ry,ru ),BMcond ( rQ) {};35 EKFCh_unQ ( ) :EKFCh ( ),BMcond ( ) {}; 36 36 void condition ( const vec &Q0 ) { 37 37 Q.setD ( Q0,0 ); … … 45 45 public: 46 46 //! Default constructor 47 EKFCh_cond ( RV rx, RV ry,RV ru,RV rC ) :EKFCh ( rx,ry,ru ),BMcond ( rC) {};47 EKFCh_cond ( ) :EKFCh ( ),BMcond ( ) {}; 48 48 void condition ( const vec &val ) { 49 49 pfxu->condition ( val ); -
bdm/estim/libKF.cpp
r278 r279 164 164 165 165 166 EKFCh::EKFCh ( ) : KalmanCh ( ) {}167 166 168 167 void EKFCh::set_parameters ( diffbifn* pfxu0, diffbifn* phxu0,const chmat Q0,const chmat R0 ) { … … 170 169 phxu = phxu0; 171 170 171 dimx = pfxu0->_dimy(); 172 dimy = phxu0->_dimy(); 173 dimu = pfxu0->_dimu(); 174 // set size of mu - just for constant terms of A and C 175 _mu=zeros(dimx); 176 A=zeros(dimx,dimx); 177 C=zeros(dimy,dimx); 178 preA=zeros(dimy+dimx+dimx, dimy+dimx); 179 172 180 //initialize matrices A C, later, these will be only updated! 173 181 pfxu->dfdx_cond ( _mu,zeros ( dimu ),A,true ); -
bdm/estim/libKF.h
r271 r279 229 229 diffbifn* phxu; 230 230 public: 231 //! Default constructor232 EKFCh ();233 231 //! Set nonlinear functions for mean values and covariance matrices. 234 232 void set_parameters ( diffbifn* pfxu, diffbifn* phxu, const chmat Q0, const chmat R0 ); -
bdm/estim/libPF.h
r271 r279 47 47 { par = par0; obs=obs0; est.set_parameters ( ones(n0),epdf0 ); }; 48 48 void set_parameters ( mpdf *par0, mpdf *obs0, int n0 ) 49 { par = par0; obs=obs0; n=n0; };49 { par = par0; obs=obs0; n=n0; est.set_n(n);}; 50 50 void set_statistics (const vec w0, epdf *epdf0){est.set_parameters ( w0,epdf0 );}; 51 51 //!@} … … 80 80 Coms ( _w.length() ) { 81 81 }; 82 83 82 void set_elements ( int &i, double wi, const epdf* ep ) 84 83 {_w ( i ) =wi; Coms ( i ) =ep;}; 85 84 85 void set_n(int n){E.set_n(n); Coms.set_length(n);} 86 86 vec mean() const { 87 87 // ugly … … 113 113 MPF ( mpdf *par0, mpdf *obs0, int n, const BM_T &BMcond0 ) : PF (), jest ( est ) { 114 114 PF::set_parameters(par0,obs0,n); 115 jest.set_n(n); 115 116 // 116 117 //TODO test if rv and BMcond.rv are compatible. -
bdm/math/chmat.cpp
r262 r279 20 20 }; 21 21 void chmat::mult_sym ( const mat &C , chmat &U ) const { 22 it_error ( "not implemented" ); 22 mat Z=C*Ch; 23 U.Ch= chol(Z*Z.T()); 23 24 }; 24 25 void chmat::mult_sym_t ( const mat &C ) { -
bdm/stat/libBM.h
r271 r279 659 659 class BMcond :public bdmroot { 660 660 protected: 661 //!dimension of the conditioning variable 662 int dimc; 661 663 //! Identificator of the conditioning variable 662 664 RV rvc;