Changeset 532

Show
Ignore:
Timestamp:
08/14/09 13:15:00 (15 years ago)
Author:
vbarta
Message:

moved mpdf::samplecond_m body to .cpp

Location:
library/bdm/base
Files:
2 modified

Legend:

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

    r527 r532  
    168168} 
    169169 
     170mat mpdf::samplecond_m (const vec &cond, int N) { 
     171        mat M( dimension(), N ); 
     172        for ( int i = 0; i < N; i++ ) { 
     173                M.set_col ( i, samplecond( cond ) ); 
     174        } 
     175 
     176        return M; 
     177} 
     178 
    170179void mpdf::from_setting ( const Setting &set ) { 
    171180        shared_ptr<RV> r = UI::build<RV> ( set, "rv", UI::optional ); 
  • library/bdm/base/bdmbase.h

    r531 r532  
    121121                //! Constructor of empty RV 
    122122                RV() : dsize (0), len (0), ids (0), times (0) {} 
     123 
    123124                //! Constructor of a single RV with given id 
    124125                RV (string name, int sz, int tm = 0); 
     126 
     127                // compiler-generated copy constructor is used 
    125128                //!@} 
    126129 
     
    425428 
    426429                //! Returns \param N samples from the density conditioned on \c cond, \f$x \sim epdf(rv|cond)\f$. \param cond is numeric value of \c rv 
    427                 virtual mat samplecond_m (const vec &cond, int N) { 
    428                         mat M(dimension(), N); 
    429                         for(int i=0;i<N;i++){M.set_col(i, samplecond(cond));} 
    430                         return M; 
    431                 } 
    432  
     430                virtual mat samplecond_m (const vec &cond, int N); 
    433431 
    434432                //! Shortcut for conditioning and evaluation of the internal epdf. In some cases,  this operation can be implemented efficiently.