Changeset 19 for bdm/stat/libBM.h
- Timestamp:
- 02/16/08 15:12:24 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/libBM.h
r18 r19 25 25 */ 26 26 class RV { 27 int size,len; 27 //! size = sum of sizes 28 int size; 29 //! len = number of individual rvs 30 int len; 28 31 ivec ids; 29 32 ivec sizes; … … 46 49 47 50 //! Return length (number of scalars) of the RV. 48 int count() {return size;}51 int count() const {return size;} ; 49 52 //TODO why not inline and later?? 50 53 … … 61 64 //! Generate new \c RV with \c time shifted by delta. 62 65 void t(int delta); 66 //! generate a list of indeces, i.e. which 67 ivec indexlist(); 63 68 }; 64 69 … … 66 71 67 72 68 //! Class representing function of variables73 //! Class representing function $f(x)$ of variable $x$ represented by \c rv 69 74 class fnc { 70 75 RV rv; 76 public: 77 //! function evaluates numerical value of $f(x)$ at $x=cond$ 78 virtual vec eval(vec &cond){}; //Fixme: virtual? 71 79 }; 72 80 … … 93 101 // virtual vec moment ( const int order = 1 ); 94 102 //! Returns a sample from the density, $x \sim epdf(rv)$ 95 virtual vec sample () {};103 virtual vec sample ()=0; 96 104 virtual double eval(const vec &val){}; 97 105 }; … … 119 127 */ 120 128 class DS { 129 protected: 121 130 //!Observed variables, returned by \c getdata(). 122 131 RV Drv;