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/merger.h

    r679 r693  
    4646protected: 
    4747        //! Elements of composition 
    48         Array<shared_ptr<mpdf> > mpdfs; 
    49  
    50         //! Data link for each mpdf in mpdfs 
     48        Array<shared_ptr<pdf> > pdfs; 
     49 
     50        //! Data link for each pdf in pdfs 
    5151        Array<datalink_m2e*> dls; 
    5252 
    53         //! Array of rvs that are not modelled by mpdfs at all, \f$ z_i \f$ 
     53        //! Array of rvs that are not modelled by pdfs at all, \f$ z_i \f$ 
    5454        Array<RV> rvzs; 
    5555 
     
    9090 
    9191        //!Constructor from sources 
    92         merger_base ( const Array<shared_ptr<mpdf> > &S ); 
     92        merger_base ( const Array<shared_ptr<pdf> > &S ); 
    9393 
    9494        //! Function setting the main internal structures 
    95         void set_sources ( const Array<shared_ptr<mpdf> > &Sources ) { 
    96                 mpdfs = Sources; 
    97                 Nsources = mpdfs.length(); 
     95        void set_sources ( const Array<shared_ptr<pdf> > &Sources ) { 
     96                pdfs = Sources; 
     97                Nsources = pdfs.length(); 
    9898                //set sizes 
    9999                dls.set_size ( Sources.length() ); 
     
    101101                zdls.set_size ( Sources.length() ); 
    102102 
    103                 rv = get_composite_rv ( mpdfs, /* checkoverlap = */ false ); 
     103                rv = get_composite_rv ( pdfs, /* checkoverlap = */ false ); 
    104104 
    105105                RV rvc; 
    106106                // Extend rv by rvc! 
    107                 for ( int i = 0; i < mpdfs.length(); i++ ) { 
    108                         RV rvx = mpdfs ( i )->_rvc().subt ( rv ); 
     107                for ( int i = 0; i < pdfs.length(); i++ ) { 
     108                        RV rvx = pdfs ( i )->_rvc().subt ( rv ); 
    109109                        rvc.add ( rvx ); // add rv to common rvc 
    110110                } 
     
    117117                // create links between sources and common rv 
    118118                RV xytmp; 
    119                 for ( int i = 0; i < mpdfs.length(); i++ ) { 
    120                         //Establich connection between mpdfs and merger 
     119                for ( int i = 0; i < pdfs.length(); i++ ) { 
     120                        //Establich connection between pdfs and merger 
    121121                        dls ( i ) = new datalink_m2e; 
    122                         dls ( i )->set_connection ( mpdfs ( i )->_rv(), mpdfs ( i )->_rvc(), rv ); 
    123  
    124                         // find out what is missing in each mpdf 
    125                         xytmp = mpdfs ( i )->_rv(); 
    126                         xytmp.add ( mpdfs ( i )->_rvc() ); 
     122                        dls ( i )->set_connection ( pdfs ( i )->_rv(), pdfs ( i )->_rvc(), rv ); 
     123 
     124                        // find out what is missing in each pdf 
     125                        xytmp = pdfs ( i )->_rv(); 
     126                        xytmp.add ( pdfs ( i )->_rvc() ); 
    127127                        // z_i = common_rv-xy 
    128128                        rvzs ( i ) = rv.subt ( xytmp ); 
     
    185185                //check if sources overlap: 
    186186                bool OK = true; 
    187                 for ( int i = 0; i < mpdfs.length(); i++ ) { 
     187                for ( int i = 0; i < pdfs.length(); i++ ) { 
    188188                        OK &= ( rvzs ( i )._dsize() == 0 ); // z_i is empty 
    189                         OK &= ( mpdfs ( i )->_rvc()._dsize() == 0 ); // y_i is empty 
     189                        OK &= ( pdfs ( i )->_rvc()._dsize() == 0 ); // y_i is empty 
    190190                } 
    191191 
    192192                if ( OK ) { 
    193                         mat lW = zeros ( mpdfs.length(), eSmp._w().length() ); 
     193                        mat lW = zeros ( pdfs.length(), eSmp._w().length() ); 
    194194 
    195195                        vec emptyvec ( 0 ); 
    196                         for ( int i = 0; i < mpdfs.length(); i++ ) { 
     196                        for ( int i = 0; i < pdfs.length(); i++ ) { 
    197197                                for ( int j = 0; j < eSmp._w().length(); j++ ) { 
    198                                         lW ( i, j ) = mpdfs ( i )->evallogcond ( eSmp._samples() ( j ), emptyvec ); 
     198                                        lW ( i, j ) = pdfs ( i )->evallogcond ( eSmp._samples() ( j ), emptyvec ); 
    199199                                } 
    200200                        } 
     
    313313        merger_mix ():Ncoms(0), effss_coef(0), stop_niter(0) { } 
    314314 
    315         merger_mix ( const Array<shared_ptr<mpdf> > &S ): 
     315        merger_mix ( const Array<shared_ptr<pdf> > &S ): 
    316316                Ncoms(0), effss_coef(0), stop_niter(0) { 
    317317                set_sources ( S ); 
     
    319319 
    320320        //! Set sources and prepare all internal structures 
    321         void set_sources ( const Array<shared_ptr<mpdf> > &S ) { 
     321        void set_sources ( const Array<shared_ptr<pdf> > &S ) { 
    322322                merger_base::set_sources ( S ); 
    323323                Nsources = S.length();