Changeset 864
- Timestamp:
- 03/12/10 13:42:07 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/bdmbase.h
r854 r864 492 492 //! Probability density function with numerical statistics, e.g. posterior density. 493 493 class epdf : public pdf { 494 LOG_LEVEL(epdf, jedna,dva,tri,deset);494 LOG_LEVEL(epdf, logmean, loglb, logub, logfull); 495 495 496 496 public: … … 552 552 ub = mea + 2 * std; 553 553 }; 554 //! Set statistics to match given input epdf. Typically it copies statistics from epdf of the same type and projects those form different types 555 //! \param pdf0 epdf to match 556 //! \param option placeholder for potential options 557 void set_statistics(const epdf *pdf0) NOT_IMPLEMENTED_VOID; 554 558 //!@} 555 559 … … 891 895 892 896 class DS : public root { 893 LOG_LEVEL(DS, dt);897 LOG_LEVEL(DS, dt); 894 898 protected: 895 899 //! size of data returned by \c getdata() … … 979 983 980 984 class BM : public root { 981 LOG_LEVEL(BM, full,likelihood,bounds);985 LOG_LEVEL(BM, full, likelihood, bounds); 982 986 983 987 protected: … … 1022 1026 //! This function evaluates only \f$ y_t \f$, condition is assumed to be the last used in bayes(). 1023 1027 //! See bdm::BM::predictor for conditional version. 1024 virtual double logpred ( const vec &yt ) const = 0;1028 virtual double logpred ( const vec &yt ) const NOT_IMPLEMENTED(0.0); 1025 1029 1026 1030 //! Matrix version of logpred … … 1034 1038 1035 1039 //!Constructs a predictive density \f$ f(d_{t+1} |d_{t}, \ldots d_{0}) \f$ 1036 virtual epdf* epredictor() const = 0;1040 virtual epdf* epredictor() const NOT_IMPLEMENTED(NULL); 1037 1041 1038 1042 //!Constructs conditional density of 1-step ahead predictor \f$ f(d_{t+1} |d_{t+h-1}, \ldots d_{t}) \f$ 1039 virtual pdf* predictor() const = 0;1043 virtual pdf* predictor() const NOT_IMPLEMENTED(NULL); 1040 1044 1041 1045 //!@} … … 1059 1063 int dimension() const { 1060 1064 return posterior().dimension(); 1065 } 1066 //! access function 1067 const RV& _rv() const { 1068 return posterior()._rv(); 1061 1069 } 1062 1070 //! access function … … 1090 1098 //! return posterior density 1091 1099 virtual const epdf& posterior() const = 0; 1100 1101 epdf& prior() {return const_cast<epdf&>(posterior());} 1102 //! set prior density -- same as posterior but writable 1103 virtual void set_prior(const epdf *pdf0) NOT_IMPLEMENTED_VOID; 1104 1092 1105 //!@} 1093 1106 … … 1120 1133 1121 1134 UI::get ( log_level, set, "log_level", UI::optional ); 1122 1123 1135 } 1124 1136 … … 1134 1146 { 1135 1147 if ( log_level[full] ) { 1136 const_cast<epdf&> ( posterior() ).log_level[epdf:: deset] = true;1148 const_cast<epdf&> ( posterior() ).log_level[epdf::logfull] = true; 1137 1149 } else { 1138 1150 if ( log_level[bounds] ) { 1139 const_cast<epdf&> ( posterior() ).log_level[epdf:: dva] = true;1151 const_cast<epdf&> ( posterior() ).log_level[epdf::loglb] = true; 1140 1152 } else { 1141 const_cast<epdf&> ( posterior() ).log_level[epdf:: jedna] = true;;1153 const_cast<epdf&> ( posterior() ).log_level[epdf::logmean] = true;; 1142 1154 } 1143 1155 if ( log_level[likelihood] ) {