Show
Ignore:
Timestamp:
11/02/09 17:27:29 (15 years ago)
Author:
mido
Message:

mpdf renamed to pdf in the whole library

Files:
1 modified

Legend:

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

    r676 r693  
    145145Still having only one density but allowing conditioning on either input or delayed values. 
    146146*/ 
    147 class MpdfDS :public DS { 
     147class PdfDS :public DS { 
    148148        protected: 
    149149                //! internal pointer to epdf from which we samplecond 
    150                 shared_ptr<mpdf> impdf; 
     150                shared_ptr<pdf> ipdf; 
    151151                //! internal storage of data sample 
    152152                vec yt; 
     
    165165                        ut2rgr.filldown ( ut,rgr ); 
    166166                        yt2rgr.filldown ( yt,rgr ); 
    167                         yt=impdf->samplecond ( rgr ); 
     167                        yt=ipdf->samplecond ( rgr ); 
    168168                        ut2rgr.step(ut); //u is now history 
    169169                } 
     
    177177                /*! 
    178178                \code 
    179                 class = "MpdfDS"; 
    180                 mpdf = {class="mpdf_offspring", ...};  // mpdf to simulate 
     179                class = "PdfDS"; 
     180                pdf = {class="pdf_offspring", ...};  // pdf to simulate 
    181181                --- optional --- 
    182182                init_rv = {class="RV",names=...};      // define what rv to initialize - typically delayed values! 
     
    187187                */ 
    188188                void from_setting ( const Setting &set ) { 
    189                         impdf=UI::build<mpdf> ( set,"mpdf",UI::compulsory ); 
     189                        ipdf=UI::build<pdf> ( set,"pdf",UI::compulsory ); 
    190190                         
    191                         Yrv = impdf->_rv(); 
     191                        Yrv = ipdf->_rv(); 
    192192                        // get unique rvs form rvc 
    193                         RV rgrv0=impdf->_rvc().remove_time(); 
     193                        RV rgrv0=ipdf->_rvc().remove_time(); 
    194194                        // input is what in not in Yrv 
    195195                        Urv=rgrv0.subt(Yrv);  
    196196                        set_drv(Yrv, Urv); 
    197197                        // connect input and output to rvc 
    198                         ut2rgr.set_connection(impdf->_rvc(), Urv);  
    199                         yt2rgr.set_connection(impdf->_rvc(), Yrv);  
     198                        ut2rgr.set_connection(ipdf->_rvc(), Urv);  
     199                        yt2rgr.set_connection(ipdf->_rvc(), Yrv);  
    200200                         
    201201                        //set history - if given 
     
    212212                        } 
    213213 
    214                         yt = zeros ( impdf->dimension() ); 
    215                         rgr = zeros ( impdf->dimensionc() ); 
     214                        yt = zeros ( ipdf->dimension() ); 
     215                        rgr = zeros ( ipdf->dimensionc() ); 
    216216                        ut = zeros(Urv._dsize()); 
    217217 
     
    225225                        ut2rgr.filldown ( ut,rgr ); 
    226226                        yt2rgr.filldown ( yt,rgr ); 
    227                         yt=impdf->samplecond ( rgr ); 
    228                 } 
    229 }; 
    230 UIREGISTER ( MpdfDS ); 
     227                        yt=ipdf->samplecond ( rgr ); 
     228                } 
     229}; 
     230UIREGISTER ( PdfDS ); 
    231231 
    232232/*! Pseudovirtual class for reading data from files 
     
    307307        private: 
    308308                //!conditional pdf of the state evolution \f$ f(x_t|x_{t-1}) \f$ 
    309                 shared_ptr<mpdf> IM; 
     309                shared_ptr<pdf> IM; 
    310310 
    311311                //!conditional pdf of the observations \f$ f(d_t|x_t) \f$ 
    312                 shared_ptr<mpdf> OM; 
     312                shared_ptr<pdf> OM; 
    313313 
    314314        protected: 
     
    331331                } 
    332332                //! convenience constructor 
    333                 stateDS ( const shared_ptr<mpdf> &IM0, const shared_ptr<mpdf> &OM0, int usize ) : IM ( IM0 ), OM ( OM0 ), 
     333                stateDS ( const shared_ptr<pdf> &IM0, const shared_ptr<pdf> &OM0, int usize ) : IM ( IM0 ), OM ( OM0 ), 
    334334                                dt ( OM0->dimension() ), xt ( IM0->dimension() ), 
    335335                                ut ( usize ), L_xt ( 0 ) { } 
     
    360360                        type = "stateDS"; 
    361361                        //Internal model 
    362                         IM = { type = "mpdf"; //<-- valid offspring! e.g. "mlnorm" 
     362                        IM = { type = "pdf"; //<-- valid offspring! e.g. "mlnorm" 
    363363                                rv = { //description of x_t 
    364364                                        names=["name1",...]; 
     
    373373                                }; 
    374374                        //Observation model 
    375                         OM = { type = "mpdf-offspring"; 
     375                        OM = { type = "pdf-offspring"; 
    376376                                rv = {}; //description of d_t 
    377377                                rvu = {type="internal", path="system.IM.rvu"}; //description of u_t