Changeset 690 for library

Show
Ignore:
Timestamp:
11/02/09 13:41:14 (15 years ago)
Author:
smidl
Message:

details

Location:
library/bdm/base
Files:
2 modified

Legend:

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

    r682 r690  
    386386} 
    387387 
    388 void BM::bayes_batch ( const mat &Data ) { 
     388void BM::bayes_batch ( const mat &Data, const vec &cond ) { 
    389389        for ( int t = 0; t < Data.cols(); t++ ) { 
    390                 bayes ( Data.get_col ( t ) ); 
    391         } 
    392 } 
    393 } 
     390                bayes ( Data.get_col ( t ), cond ); 
     391        } 
     392} 
     393void BM::bayes_batch ( const mat &Data, const mat &Cond ) { 
     394        for ( int t = 0; t < Data.cols(); t++ ) { 
     395                bayes ( Data.get_col ( t ), Cond.get_col(t) ); 
     396        } 
     397} 
     398} 
  • library/bdm/base/bdmbase.h

    r685 r690  
    10911091        virtual void bayes ( const vec &yt, const vec &cond=empty_vec ) = 0; 
    10921092        //! Batch Bayes rule (columns of Dt are observations) 
    1093         virtual void bayes_batch ( const mat &Dt ); 
     1093        virtual void bayes_batch ( const mat &Dt, const vec &cond=empty_vec ); 
     1094        //! Batch Bayes rule (columns of Dt are observations, columns of Cond are conditions) 
     1095        virtual void bayes_batch ( const mat &Dt, const mat &Cond ); 
    10941096        //! Evaluates predictive log-likelihood of the given data record 
    10951097        //! I.e. marginal likelihood of the data with the posterior integrated out.