Show
Ignore:
Timestamp:
10/21/09 20:19:40 (15 years ago)
Author:
mido
Message:

experiment: epdf as a descendat of mpdf

Files:
1 modified

Legend:

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

    r660 r675  
    4747        //!datalink between conditional and nom 
    4848        datalink_m2e dl; 
    49         //! dummy epdf that stores only rv and dim 
    50         epdf iepdf; 
    5149public: 
    5250        //!Default constructor. By default, the given epdf is not copied! 
    5351        //! It is assumed that this function will be used only temporarily. 
    54         mratio ( const epdf* nom0, const RV &rv, bool copy = false ) : mpdf ( ), dl ( ),iepdf() { 
     52        mratio ( const epdf* nom0, const RV &rv, bool copy = false ) : mpdf ( ), dl ( ) { 
    5553                // adjust rv and rvc 
     54 
     55                set_rv( rv ); // TODO co kdyby tohle samo uz nastavovalo dimension?!?! 
     56                dim = rv._dsize(); 
     57 
    5658                rvc = nom0->_rv().subt ( rv ); 
    5759                dimc = rvc._dsize(); 
    58                 set_ep ( iepdf ); 
    59                 iepdf.set_parameters ( rv._dsize() ); 
    60                 iepdf.set_rv ( rv ); 
    61  
     60         
    6261                //prepare data structures 
    6362                if ( copy ) { 
     
    7473                dl.set_connection ( rv, rvc, nom0->_rv() ); 
    7574        }; 
     75 
    7676        double evallogcond ( const vec &val, const vec &cond ) { 
    7777                double tmp; 
     
    469469        //!weights of the components 
    470470        vec w; 
    471         //! dummy epdfs 
    472         epdf dummy_epdf; 
    473471public: 
    474472        //!Default constructor 
    475         mmix() : Coms(0), dummy_epdf() { set_ep(dummy_epdf);    } 
     473        mmix() : Coms(0) { } 
    476474 
    477475        //! Set weights \c w and components \c R 
     
    483481                if (Coms0.length()>0){ 
    484482                        set_rv(Coms(0)->_rv()); 
    485                         dummy_epdf.set_parameters(Coms(0)->_rv()._dsize()); 
     483                        dim = rv._dsize(); 
    486484                        set_rvc(Coms(0)->_rvc()); 
    487485                        dimc = rvc._dsize();