Show
Ignore:
Timestamp:
03/12/10 13:42:07 (14 years ago)
Author:
smidl
Message:

log_level fixes + abstract fixes

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/bdmbase.h

    r854 r864  
    492492//! Probability density function with numerical statistics, e.g. posterior density. 
    493493class epdf : public pdf { 
    494         LOG_LEVEL(epdf,jedna,dva,tri,deset); 
     494        LOG_LEVEL(epdf, logmean, loglb, logub, logfull); 
    495495 
    496496public: 
     
    552552                ub = mea + 2 * std; 
    553553        }; 
     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; 
    554558        //!@} 
    555559 
     
    891895 
    892896class DS : public root { 
    893         LOG_LEVEL(DS,dt); 
     897        LOG_LEVEL(DS, dt); 
    894898protected: 
    895899        //! size of data returned by \c getdata() 
     
    979983 
    980984class BM : public root { 
    981         LOG_LEVEL(BM,full,likelihood,bounds); 
     985        LOG_LEVEL(BM, full, likelihood, bounds); 
    982986 
    983987protected: 
     
    10221026        //! This function evaluates only \f$ y_t \f$, condition is assumed to be the last used in bayes(). 
    10231027        //! 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); 
    10251029 
    10261030        //! Matrix version of logpred 
     
    10341038 
    10351039        //!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); 
    10371041 
    10381042        //!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); 
    10401044 
    10411045        //!@} 
     
    10591063        int dimension() const { 
    10601064                return posterior().dimension(); 
     1065        } 
     1066        //! access function 
     1067        const RV& _rv() const { 
     1068                return posterior()._rv(); 
    10611069        } 
    10621070        //! access function 
     
    10901098        //! return posterior density 
    10911099        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         
    10921105        //!@} 
    10931106 
     
    11201133 
    11211134                UI::get ( log_level, set, "log_level", UI::optional ); 
    1122  
    11231135        } 
    11241136 
     
    11341146        { 
    11351147                if ( log_level[full] ) { 
    1136                         const_cast<epdf&> ( posterior() ).log_level[epdf::deset] = true; 
     1148                        const_cast<epdf&> ( posterior() ).log_level[epdf::logfull] = true; 
    11371149                } else { 
    11381150                        if ( log_level[bounds] ) { 
    1139                                 const_cast<epdf&> ( posterior() ).log_level[epdf::dva] = true; 
     1151                                const_cast<epdf&> ( posterior() ).log_level[epdf::loglb] = true; 
    11401152                        } else { 
    1141                                 const_cast<epdf&> ( posterior() ).log_level[epdf::jedna] = true;; 
     1153                                const_cast<epdf&> ( posterior() ).log_level[epdf::logmean] = true;; 
    11421154                        } 
    11431155                        if ( log_level[likelihood] ) {