Changeset 231

Show
Ignore:
Timestamp:
01/15/09 10:53:56 (15 years ago)
Author:
smidl
Message:

clean up

Location:
bdm/estim
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • bdm/estim/ekf_templ.h

    r229 r231  
    4141}; 
    4242 
     43//!Extended Kalman filter with unknown parameters in \c IM 
     44class EKFCh_cond : public EKFCh , public BMcond { 
     45        public: 
     46        //! Default constructor 
     47                EKFCh_cond ( RV rx, RV ry,RV ru,RV rC ) :EKFCh ( rx,ry,ru ),BMcond ( rC ) {}; 
     48                void condition ( const vec &val ) { 
     49                        pfxu->condition ( val ); 
     50                }; 
     51}; 
     52 
    4353#endif //EKF_TEMP_H 
  • bdm/estim/libKF.cpp

    r225 r231  
    7070        dimx = rv.count(); 
    7171        dimy = phxu0->_dimy(); 
    72         dimu = phxu0->_dimu(); 
     72        dimu = pfxu0->_dimu(); 
    7373 
    7474        A.set_size(dimx,dimx); 
  • bdm/estim/libPF.h

    r229 r231  
    142142        //!Access function 
    143143        BM* _BM(int i){return Bms[i];} 
    144 //SimStr: 
    145         double SSAT; 
    146144}; 
    147145 
     
    153151        ivec ind; 
    154152        double mlls=-std::numeric_limits<double>::infinity(); 
    155  
    156         // StrSim:06 
    157         double sumLWL=0.0; 
    158         double sumL2WL=0.0; 
    159         double WL = 0.0; 
    160153 
    161154        #pragma omp parallel for 
     
    167160                lls ( i ) = Bms[i]->_ll(); // lls above is also in proposal her must be lls(i) =, not +=!! 
    168161                if ( lls ( i ) >mlls ) mlls=lls ( i ); //find maximum likelihood (for numerical stability) 
    169         } 
    170  
    171         if ( false) { 
    172                 #pragma omp parallel for reduction(+:sumLWL,sumL2WL) private(WL) 
    173                 for ( i=0;i<n;i++ ) { 
    174                         WL = _w ( i ) *exp ( llsP ( i ) ); //using old weights! 
    175                         sumLWL += exp ( lls ( i ) ) *WL; 
    176                         sumL2WL += exp ( 2*lls ( i ) ) *WL; 
    177                 } 
    178                 SSAT  = sumL2WL/ ( sumLWL*sumLWL ); 
    179162        } 
    180163