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/base/bdmbase.h

    r504 r507  
    449449                //! @{ 
    450450 
    451                 RV _rv() { 
     451                RV _rv() const { 
    452452                        return ep->_rv(); 
    453453                } 
     
    742742UIREGISTER (mepdf); 
    743743 
    744 //!\brief Chain rule of pdfs - abstract part common for mprod and merger. 
    745 //!this abstract class is common to epdf and mpdf 
    746 //!\todo Think of better design - global functions rv=get_rv(Array<mpdf*> mpdfs); ?? 
    747 class compositepdf 
    748 { 
    749         protected: 
    750                 //! Elements of composition 
    751                 Array<mpdf*> mpdfs; 
    752                 bool owning_mpdfs; 
    753         public: 
    754                 compositepdf() : mpdfs (0) {}; 
    755                 compositepdf (Array<mpdf*> A0, bool own = false) { 
    756                         set_elements (A0, own); 
    757                 }; 
    758                 void set_elements (Array<mpdf*> A0, bool own = false) { 
    759                         mpdfs = A0; 
    760                         owning_mpdfs = own; 
    761                 }; 
    762                 //! find common rv, flag \param checkoverlap modifies whether overlaps are acceptable 
    763                 RV getrv (bool checkoverlap = false); 
    764                 //! common rvc of all mpdfs is written to rvc 
    765                 void setrvc (const RV &rv, RV &rvc); 
    766                 ~compositepdf() { 
    767                         if (owning_mpdfs) for (int i = 0; i < mpdfs.length(); i++) { 
    768                                         delete mpdfs (i); 
    769                                 } 
    770                 }; 
    771 }; 
     744//! \brief Combines RVs from a list of mpdfs to a single one. 
     745RV get_composite_rv ( const Array<shared_ptr<mpdf> > &mpdfs, bool checkoverlap = false ); 
    772746 
    773747/*! \brief Abstract class for discrete-time sources of data.