Changeset 504 for library/bdm/base

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

returning shared pointers from epdf::marginal & epdf::condition; testsuite run leaks down from 8402 to 6510 bytes

Location:
library/bdm/base
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/bdmbase.cpp

    r502 r504  
    134134} 
    135135 
     136shared_ptr<mpdf> epdf::condition (const RV &rv) const { 
     137        it_warning ("Not implemented"); 
     138        return shared_ptr<mpdf>(); 
     139} 
     140 
     141shared_ptr<epdf> epdf::marginal (const RV &rv) const { 
     142        it_warning ("Not implemented"); 
     143        return shared_ptr<epdf>(); 
     144} 
     145 
    136146mat epdf::sample_m ( int N ) const { 
    137147        mat X = zeros ( dim, N ); 
  • library/bdm/base/bdmbase.h

    r502 r504  
    317317 
    318318                //! Return conditional density on the given RV, the remaining rvs will be in conditioning 
    319                 virtual mpdf* condition (const RV &rv) const  { 
    320                         it_warning ("Not implemented"); 
    321                         return NULL; 
    322                 } 
     319                virtual shared_ptr<mpdf> condition (const RV &rv) const; 
    323320 
    324321                //! Return marginal density on the given RV, the remainig rvs are intergrated out 
    325                 virtual epdf* marginal (const RV &rv) const { 
    326                         it_warning ("Not implemented"); 
    327                         return NULL; 
    328                 } 
     322                virtual shared_ptr<epdf> marginal (const RV &rv) const; 
    329323 
    330324                //! return expected value