Changeset 271 for bdm/estim/libKF.cpp

Show
Ignore:
Timestamp:
02/16/09 10:03:13 (15 years ago)
Author:
smidl
Message:

Next major revision

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bdm/estim/libKF.cpp

    r270 r271  
    66using std::endl; 
    77 
    8 KalmanFull::KalmanFull ( mat A0, mat B0, mat C0, mat D0, mat R0, mat Q0, mat P0, vec mu0 ) { 
     8KalmanFull::KalmanFull ( mat A0, mat B0, mat C0, mat D0, mat Q0, mat R0, mat P0, vec mu0 ) { 
    99        dimx = A0.rows(); 
    1010        dimu = B0.cols(); 
     
    1515        it_assert_debug ( C0.cols() ==dimx, "KalmanFull: C is not square" ); 
    1616        it_assert_debug ( ( D0.rows() ==dimy ) || ( D0.cols() ==dimu ), "KalmanFull: D is not compatible" ); 
     17        it_assert_debug ( ( Q0.cols() ==dimx ) || ( Q0.rows() ==dimx ), "KalmanFull: Q is not compatible" ); 
    1718        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" ); 
    1919 
    2020        A = A0; 
     
    116116 
    117117 
    118 void KalmanCh::set_parameters ( const mat &A0,const mat &B0,const mat &C0,const mat &D0,const chmat &R0,const chmat &Q0 ) { 
    119  
    120         ( ( Kalman<chmat>* ) this )->set_parameters ( A0,B0,C0,D0,R0,Q0 ); 
     118void KalmanCh::set_parameters ( const mat &A0,const mat &B0,const mat &C0,const mat &D0,const chmat &Q0,const chmat &R0 ) { 
     119 
     120        ( ( Kalman<chmat>* ) this )->set_parameters ( A0,B0,C0,D0,Q0,R0 ); 
    121121        // Cholesky special! 
    122         preA.clear(); 
     122        preA=zeros(dimy+dimx+dimx,dimy+dimx); 
     123//      preA.clear(); 
    123124        preA.set_submatrix ( 0,0,R._Ch() ); 
    124125        preA.set_submatrix ( dimy+dimx,dimy,Q._Ch() );