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/stat/emix.h

    r675 r693  
    3535At present the only supported operation is evallogcond(). 
    3636 */ 
    37 class mratio: public mpdf { 
     37class mratio: public pdf { 
    3838protected: 
    39         //! Nominator in the form of mpdf 
     39        //! Nominator in the form of pdf 
    4040        const epdf* nom; 
    4141 
     
    5050        //!Default constructor. By default, the given epdf is not copied! 
    5151        //! It is assumed that this function will be used only temporarily. 
    52         mratio ( const epdf* nom0, const RV &rv, bool copy = false ) : mpdf ( ), dl ( ) { 
     52        mratio ( const epdf* nom0, const RV &rv, bool copy = false ) : pdf ( ), dl ( ) { 
    5353                // adjust rv and rvc 
    5454 
     
    178178        //! Update already existing marginal density  \c target 
    179179        void marginal ( const RV &rv, emix &target ) const; 
    180         shared_ptr<mpdf> condition ( const RV &rv ) const; 
     180        shared_ptr<pdf> condition ( const RV &rv ) const; 
    181181 
    182182//Access methods 
     
    283283Note that 
    284284*/ 
    285 class mprod: public mpdf { 
     285class mprod: public pdf { 
    286286private: 
    287         Array<shared_ptr<mpdf> > mpdfs; 
    288  
    289         //! Data link for each mpdfs 
     287        Array<shared_ptr<pdf> > pdfs; 
     288 
     289        //! Data link for each pdfs 
    290290        Array<shared_ptr<datalink_m2m> > dls; 
    291291 
     
    300300        /*!\brief Constructor from list of mFacs 
    301301        */ 
    302         mprod ( const Array<shared_ptr<mpdf> > &mFacs ) { 
     302        mprod ( const Array<shared_ptr<pdf> > &mFacs ) { 
    303303                set_elements ( mFacs ); 
    304304        } 
    305         //! Set internal \c mpdfs from given values 
    306         void set_elements (const Array<shared_ptr<mpdf> > &mFacs ); 
     305        //! Set internal \c pdfs from given values 
     306        void set_elements (const Array<shared_ptr<pdf> > &mFacs ); 
    307307 
    308308        double evallogcond ( const vec &val, const vec &cond ) { 
    309309                int i; 
    310310                double res = 0.0; 
    311                 for ( i = mpdfs.length() - 1; i >= 0; i-- ) { 
    312                         /*                      if ( mpdfs(i)->_rvc().count() >0) { 
    313                                                         mpdfs ( i )->condition ( dls ( i )->get_cond ( val,cond ) ); 
     311                for ( i = pdfs.length() - 1; i >= 0; i-- ) { 
     312                        /*                      if ( pdfs(i)->_rvc().count() >0) { 
     313                                                        pdfs ( i )->condition ( dls ( i )->get_cond ( val,cond ) ); 
    314314                                                } 
    315315                                                // add logarithms 
    316316                                                res += epdfs ( i )->evallog ( dls ( i )->pushdown ( val ) );*/ 
    317                         res += mpdfs ( i )->evallogcond ( 
     317                        res += pdfs ( i )->evallogcond ( 
    318318                                   dls ( i )->pushdown ( val ), 
    319319                                   dls ( i )->get_cond ( val, cond ) 
     
    344344                vec smpi; 
    345345                // Hard assumption here!!! We are going backwards, to assure that samples that are needed from smp are already generated! 
    346                 for ( int i = ( mpdfs.length() - 1 ); i >= 0; i-- ) { 
    347                         // generate contribution of this mpdf 
    348                         smpi = mpdfs(i)->samplecond(dls ( i )->get_cond ( smp , cond ));                         
     346                for ( int i = ( pdfs.length() - 1 ); i >= 0; i-- ) { 
     347                        // generate contribution of this pdf 
     348                        smpi = pdfs(i)->samplecond(dls ( i )->get_cond ( smp , cond ));                  
    349349                        // copy contribution of this pdf into smp 
    350350                        dls ( i )->pushup ( smp, smpi ); 
     
    356356        //!  \code 
    357357        //! { class='mprod'; 
    358         //!   mpdfs = (..., ...);     // list of mpdfs in the order of chain rule 
     358        //!   pdfs = (..., ...);     // list of pdfs in the order of chain rule 
    359359        //! } 
    360360        //! \endcode 
    361361        //!@} 
    362362        void from_setting ( const Setting &set ) { 
    363                 Array<shared_ptr<mpdf> > atmp; //temporary Array 
    364                 UI::get ( atmp, set, "mpdfs", UI::compulsory ); 
     363                Array<shared_ptr<pdf> > atmp; //temporary Array 
     364                UI::get ( atmp, set, "pdfs", UI::compulsory ); 
    365365                set_elements ( atmp ); 
    366366        } 
     
    460460 
    461461 
    462 /*! \brief Mixture of mpdfs with constant weights, all mpdfs are of equal RV and RVC 
     462/*! \brief Mixture of pdfs with constant weights, all pdfs are of equal RV and RVC 
    463463 
    464464*/ 
    465 class mmix : public mpdf { 
     465class mmix : public pdf { 
    466466protected: 
    467         //! Component (mpdfs) 
    468         Array<shared_ptr<mpdf> > Coms; 
     467        //! Component (pdfs) 
     468        Array<shared_ptr<pdf> > Coms; 
    469469        //!weights of the components 
    470470        vec w; 
     
    474474 
    475475        //! Set weights \c w and components \c R 
    476         void set_parameters ( const vec &w0, const Array<shared_ptr<mpdf> > &Coms0 ) { 
     476        void set_parameters ( const vec &w0, const Array<shared_ptr<pdf> > &Coms0 ) { 
    477477                //!\todo check if all components are OK 
    478478                Coms = Coms0;