Show
Ignore:
Timestamp:
08/12/09 15:37:43 (15 years ago)
Author:
vbarta
Message:

removed class compositepdf; keeping mpdfs of mprod and merger_base in shared pointers

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/stat/emix.cpp

    r504 r507  
    202202        return aprgiw; 
    203203}; 
     204 
     205void mprod::set_elements (const Array<shared_ptr<mpdf> > &mFacs ) { 
     206        mpdfs = mFacs; 
     207        dls.set_size ( mFacs.length() ); 
     208 
     209        set_ep ( iepdf); 
     210        RV rv = get_composite_rv ( mpdfs, true ); 
     211        set_rv ( rv ); 
     212        iepdf.set_parameters ( rv._dsize() ); 
     213 
     214        for ( int i = 0; i < mpdfs.length(); i++ ) { 
     215                RV rvx = mpdfs ( i )->_rvc().subt ( rv ); 
     216                rvc.add ( rvx ); // add rv to common rvc 
     217        } 
     218 
     219        // rv and rvc established = > we can link them with mpdfs 
     220        for ( int i = 0; i < mpdfs.length(); i++ ) { 
     221                dls ( i ) = new datalink_m2m; 
     222                dls ( i )->set_connection ( mpdfs ( i )->_rv(), mpdfs ( i )->_rvc(), _rv(), _rvc() ); 
     223        } 
     224} 
    204225 
    205226vec mmix::samplecond(const vec &cond) {