Changeset 162 for bdm/stat/libBM.h
- Timestamp:
- 09/04/08 20:27:01 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/libBM.h
r145 r162 52 52 private: 53 53 //! auxiliary function used in constructor 54 void init ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times ); 55 public: 56 //! Full constructor which is called by the others 57 RV ( ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times ); 58 //! default constructor 59 RV ( ivec ids ); 60 //! Empty constructor will be set later 54 void init (ivec in_ids, Array<std::string> in_names, ivec in_sizes, ivec in_times ); 55 public: 56 //! Full constructor 57 RV ( Array<std::string> in_names, ivec in_sizes, ivec in_times ); 58 //! Constructor with times=0 59 RV ( Array<std::string> in_names, ivec in_sizes ); 60 //! Constructor with sizes=1, times=0 61 RV ( Array<std::string> in_names ); 62 //! Constructor of empty RV 61 63 RV (); 62 64 … … 137 139 public: 138 140 //!default constructor 139 epdf() :rv ( ivec ( 0 )) {};141 epdf() :rv ( ) {}; 140 142 141 143 //!default constructor … … 180 182 // virtual fnc moment ( const int order = 1 ); 181 183 //! Returns a sample from the density conditioned on \c cond, \f$x \sim epdf(rv|cond)\f$. \param cond is numeric value of \c rv \param ll is a return value of log-likelihood of the sample. 182 virtual vec samplecond ( vec &cond, double &ll ) {this->condition ( cond );184 virtual vec samplecond (const vec &cond, double &ll ) {this->condition ( cond ); 183 185 vec temp= ep->sample(); 184 186 ll=ep->evalpdflog ( temp );return temp;}; 185 187 //! 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 \param ll is a return value of log-likelihood of the sample. 186 virtual mat samplecond ( vec &cond, vec &ll, int N ) {188 virtual mat samplecond (const vec &cond, vec &ll, int N ) { 187 189 this->condition ( cond ); 188 190 mat temp ( rv.count(),N ); vec smp ( rv.count() );