Changeset 536 for library/bdm/estim
- Timestamp:
- 08/16/09 18:13:31 (15 years ago)
- Location:
- library/bdm/estim
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/estim/arx.h
r529 r536 110 110 //!\name Access attributes 111 111 //!@{ 112 const egiw* _e() const {113 return &est ;114 };115 112 const egiw& posterior() const { 116 113 return est; -
library/bdm/estim/kalman.h
r529 r536 125 125 return est; 126 126 } 127 const enorm<sq_T>* _e() const {128 return &est;129 }130 127 //!access function 131 128 mat& __K() { … … 214 211 return E; 215 212 }; 216 const enorm<fsqmat>* _e() const {217 return &E;218 };219 213 const mat _R() { 220 214 return P; … … 277 271 // TODO dodelat void to_setting( Setting &set ) const; 278 272 273 const enorm<chmat>& posterior() {return est;} 279 274 }; 280 275 … … 423 418 424 419 est.set_rv ( RV ( "MM", A ( 0 )->posterior().dimension(), 0 ) ); 425 est.set_parameters ( A ( 0 )-> _e()->mean(), A ( 0 )->_e()->_R() );420 est.set_parameters ( A ( 0 )->posterior().mean(), A ( 0 )->posterior()._R() ); 426 421 } 427 422 void bayes ( const vec &dt ) { … … 439 434 case 1: { 440 435 int mi = max_index ( w ); 441 const enorm<chmat> * st = ( Models ( mi )->_e() );442 est.set_parameters ( st ->mean(), st->_R() );436 const enorm<chmat> &st = Models ( mi )->posterior() ; 437 est.set_parameters ( st.mean(), st._R() ); 443 438 } 444 439 break; … … 451 446 } 452 447 } 453 //all posterior densities are equal => return the first one 454 const enorm<chmat>* _e() const { 455 return &est; 456 } 457 //all posterior densities are equal => return the first one 448 //! posterior density 458 449 const enorm<chmat>& posterior() const { 459 450 return est; -
library/bdm/estim/mixtures.h
r477 r536 21 21 namespace bdm { 22 22 23 //! enum switch for internal approximation used in MixEF 23 24 enum MixEF_METHOD { EM = 0, QB = 1}; 24 25 … … 118 119 return *est; 119 120 } 120 const eprod* _e() const {121 return est;122 }123 121 emix* epredictor() const; 124 122 //! Flatten the density as if it was not estimated from the data -
library/bdm/estim/particles.h
r488 r536 111 111 dim = E.dimension() + A ( 0 )->posterior().dimension(); 112 112 for ( int i = 0; i < _w.length() ; i++ ) { 113 Coms ( i ) = A ( i )->_e();113 Coms ( i ) = &(A ( i )->posterior()); 114 114 } 115 115 } … … 218 218 return jest; 219 219 } 220 const epdf* _e() const {221 return &jest; //Fixme: is it useful?222 }223 220 //! Set postrior of \c rvc to samples from epdf0. Statistics of BMs are not re-computed! Use only for initialization! 224 221 /* void set_est ( const epdf& epdf0 ) { … … 234 231 235 232 //!Access function 236 BM* _BM ( int i ) {233 const BM* _BM ( int i ) { 237 234 return BMs ( i ); 238 235 }