Changeset 660 for library/bdm/estim

Show
Ignore:
Timestamp:
10/15/09 00:04:30 (15 years ago)
Author:
smidl
Message:

doc - doxygen warnings

Location:
library/bdm/estim
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/estim/arx.h

    r649 r660  
    124124        //!\name Access attributes 
    125125        //!@{ 
    126         const egiw& posterior() const { 
     126                //! return correctly typed posterior (covariant return) 
     127                const egiw& posterior() const { 
    127128                return est; 
    128129        } 
     
    189190        public: 
    190191                ARXfrg():ARX(){}; 
     192                //! copy constructor 
    191193                ARXfrg(const ARXfrg &A0):ARX(A0){}; 
    192194                ARXfrg* _copy_() const {ARXfrg *A = new ARXfrg(*this); return A;} 
  • library/bdm/estim/kalman.h

    r653 r660  
    5454        public: 
    5555                StateSpace() : dimx (0), dimy (0), dimu (0), A(), B(), C(), D(), Q(), R() {} 
     56                //!copy constructor 
    5657                StateSpace(const StateSpace<sq_T> &S0) : dimx (S0.dimx), dimy (S0.dimy), dimu (S0.dimu), A(S0.A), B(S0.B), C(S0.C), D(S0.D), Q(S0.Q), R(S0.R) {} 
     58                //! set all matrix parameters 
    5759                void set_parameters (const mat &A0, const  mat &B0, const  mat &C0, const  mat &D0, const  sq_T &Q0, const sq_T &R0); 
     60                //! validation 
    5861                void validate(); 
    5962                //! not virtual in this case 
     
    116119        public: 
    117120                Kalman<sq_T>() : BM(), StateSpace<sq_T>(), yrv(),urv(), _K(),  est(new enorm<sq_T>){} 
     121                //! Copy constructor 
    118122                Kalman<sq_T>(const Kalman<sq_T> &K0) : BM(K0), StateSpace<sq_T>(K0), yrv(K0.yrv),urv(K0.urv), _K(K0._K),  est(new enorm<sq_T>(*K0.est)), fy(K0.fy){} 
     123                //!set statistics of the posterior 
    119124                void set_statistics (const vec &mu0, const mat &P0) {est->set_parameters (mu0, P0); }; 
     125                //!set statistics of the posterior 
    120126                void set_statistics (const vec &mu0, const sq_T &P0) {est->set_parameters (mu0, P0); }; 
    121                 //! posterior 
     127                //! return correctly typed posterior (covariant return) 
    122128                const enorm<sq_T>& posterior() const {return *est.get();} 
    123129                //! shared posterior 
     
    138144                        validate(); 
    139145                } 
     146                //! validate object 
    140147                void validate() { 
    141148                        StateSpace<sq_T>::validate(); 
     
    242249                        est->set_parameters (mu0, P0); 
    243250                }; 
     251                //! access function 
    244252                const mat _R() { 
    245253                        return est->_R().to_mat(); 
     
    371379                enorm<chmat> est; 
    372380        public: 
     381                //! set internal parameters 
    373382                void set_parameters (Array<EKFCh*> A, int pol0 = 1) { 
    374383                        Models = A;//TODO: test if evalll is set 
     
    406415                        } 
    407416                } 
    408                 //! posterior density 
     417                //! return correctly typed posterior (covariant return) 
    409418                const enorm<chmat>& posterior() const { 
    410419                        return est; 
  • library/bdm/estim/mixtures.h

    r565 r660  
    111111        //! EM algorithm 
    112112        void bayes ( const mat &dt ); 
     113        //! batch weighted Bayes rule  
    113114        void bayesB ( const mat &dt, const vec &wData ); 
    114115        double logpred ( const vec &dt ) const; 
    115         const epdf& posterior() const { 
     116        //! return correctly typed posterior (covariant return) 
     117        const eprod& posterior() const { 
    116118                return *est; 
    117119        } 
  • library/bdm/estim/particles.h

    r653 r660  
    106106        //!access function 
    107107        vec& _lls() { return lls; } 
     108        //!access function 
    108109        RESAMPLING_METHOD _resmethod() const { return resmethod; } 
    109         //!access function 
     110        //! return correctly typed posterior (covariant return) 
    110111        const eEmp& posterior() const {return est;} 
    111112         
     
    190191                est.resample(ind,resmethod); 
    191192        } 
     193        //! access function 
    192194        Array<vec>& __samples(){return _samples;} 
    193195}; 
     
    203205class MPF : public BM  { 
    204206        protected: 
     207                //! particle filter on non-linear variable 
    205208        shared_ptr<PF> pf; 
     209        //! Array of Bayesian models 
    206210        Array<BM*> BMs; 
    207211 
     
    209213 
    210214        class mpfepdf : public epdf  { 
     215                //! pointer to particle filter 
    211216                shared_ptr<PF> &pf; 
     217                //! pointer to Array of BMs 
    212218                Array<BM*> &BMs; 
    213219        public: 
     220                //! constructor 
    214221                mpfepdf (shared_ptr<PF> &pf0, Array<BM*> &BMs0): epdf(), pf(pf0), BMs(BMs0) { }; 
    215222                //! a variant of set parameters - this time, parameters are read from BMs and pf 
     
    300307        //! Default constructor. 
    301308        MPF () :  jest (pf,BMs) {}; 
     309        //! set all parameters at once 
    302310        void set_parameters ( shared_ptr<mpdf> par0, shared_ptr<mpdf> obs0, int n0, RESAMPLING_METHOD rm = SYSTEMATIC ) { 
    303311                pf->set_model ( par0, obs0);  
     
    305313                BMs.set_length ( n0 ); 
    306314        } 
     315        //! set a prototype of BM, copy it to as many times as there is particles in pf 
    307316        void set_BM ( const BM &BMcond0 ) { 
    308317 
     
    313322                for ( int i = 0; i < n; i++ ) { 
    314323                        BMs ( i ) = BMcond0._copy_(); 
    315                         BMs ( i )->condition ( pf->posterior()._sample ( i ) ); 
    316324                } 
    317325        }; 
     
    374382                } 
    375383                jest.read_parameters(); 
     384                for ( int i = 0; i < pf->__w().length(); i++ ) { 
     385                        BMs ( i )->condition ( pf->posterior()._sample ( i ) ); 
     386                } 
    376387        } 
    377388