Changeset 178 for bdm/stat/libBM.h

Show
Ignore:
Timestamp:
10/15/08 19:04:09 (16 years ago)
Author:
smidl
Message:

Changes in basic structures! new methods

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • bdm/stat/libBM.h

    r176 r178  
    140140}; 
    141141 
     142class mpdf; 
    142143 
    143144//! Probability density function with numerical statistics, e.g. posterior density. 
     
    173174                return x; 
    174175        } 
     176        //! Return conditional density on the given RV, the remaining rvs will be in conditioning 
     177        mpdf* condition(const RV &rv){it_warning("Not implemented"); return NULL;} 
     178        //! Return marginal density on the given RV, the remainig rvs are intergrated out 
     179        epdf* marginal(const RV &rv){it_warning("Not implemented"); return NULL;} 
    175180 
    176181        //! return expected value 
     
    183188        //! modifier function - useful when copying epdfs 
    184189        void _renewrv(const RV &in_rv){rv=in_rv;} 
     190        //! 
    185191}; 
    186192 
     
    213219        }; 
    214220        //! Update \c ep so that it represents this mpdf conditioned on \c rvc = cond 
    215         virtual void condition ( const vec &cond ) {}; 
     221        virtual void condition ( const vec &cond ) {it_error("Not implemented");}; 
    216222 
    217223        //! Shortcut for conditioning and evaluation of the internal epdf. In some cases,  this operation can be implemented efficiently. 
     
    252258                //! Indeces of rvc in common rv 
    253259                Array<ivec> rvcsinrv; 
     260                //! Indeces of common rv in rvc 
     261                Array<ivec> rvinrvcs; 
    254262        public: 
    255                 compositepdf(Array<mpdf*> A0): n(A0.length()), mpdfs(A0), rvsinrv(n), rvcsinrv(n){}; 
     263                compositepdf(Array<mpdf*> A0): n(A0.length()), mpdfs(A0), rvsinrv(n), rvcsinrv(n),rvinrvcs(n){}; 
    256264                RV getrv(bool checkoverlap=false); 
    257265                void setrvc(const RV &rv, RV &rvc); 
     
    329337        vec logpred_m(const mat &dt)const{vec tmp(dt.cols());for(int i=0;i<dt.cols();i++){tmp(i)=logpred(dt.get_col(i));}return tmp;} 
    330338         
     339        //!Constructs a predictive density (marginal density on data) 
     340        virtual epdf* predictor(const RV &rv){it_error("Not implemented");return NULL;}; 
     341         
    331342        //! Destructor for future use; 
    332343        virtual ~BM() {};