Changeset 85 for bdm/stat/libBM.h
- Timestamp:
- 04/28/08 10:21:21 (16 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
bdm/stat/libBM.h
r62 r85 28 28 protected: 29 29 //! size = sum of sizes 30 int size;30 int tsize; 31 31 //! len = number of individual rvs 32 32 int len; … … 54 54 friend std::ostream &operator<< ( std::ostream &os, const RV &rv ); 55 55 56 //! Return length (number of scalars) of the RV. 57 int count() const {return size;} ; 56 //! Return number of scalars in the RV. 57 int count() const {return tsize;} ; 58 //! Return length (number of entries) of the RV. 59 int length() const {return len;} ; 58 60 59 61 //TODO why not inline and later?? … … 62 64 ivec find ( RV rv2 ); 63 65 //! Add (concat) another variable to the current one 64 void add (const RV &rv2 );66 void add (const RV &rv2 ); 65 67 //! Add (concat) another variable to the current one 66 68 friend RV concat (const RV &rv1, const RV &rv2 ); … … 78 80 //!access function 79 81 Array<std::string>& _names(){return names;}; 80 }; 81 82 83 //! Class representing function $f(x)$ of variable $x$ represented by \c rv 82 83 //!access function 84 int id(int at){return ids(at);}; 85 //!access function 86 int size(int at){return sizes(at);}; 87 //!access function 88 int time(int at){return times(at);}; 89 //!access function 90 std::string name(int at){return names(at);}; 91 }; 92 93 94 //! Class representing function \f$f(x)\f$ of variable \f$x\f$ represented by \c rv 84 95 85 96 class fnc { … … 90 101 //!default constructor 91 102 fnc(int dy):dimy(dy){}; 92 //! function evaluates numerical value of $f(x)$ at $x=cond$103 //! function evaluates numerical value of \f$f(x)\f$ at \f$x=\f$ \c cond 93 104 virtual vec eval ( const vec &cond ) { 94 105 return vec ( 0 ); … … 199 210 void linkrvs ( RV &drv, RV &urv ); 200 211 201 //! Moves from $t$ to $t+1$, i.e. perfroms the actions and reads response of the system.212 //! Moves from \f$t\f$ to \f$t+1\f$, i.e. perfroms the actions and reads response of the system. 202 213 void step(); 203 214 … … 242 253 \brief Conditional Bayesian Filter 243 254 244 Evaluates conditional filtering density $f(rv|rvc,data)$ for a given \c rvc which is specified in each step by calling function \c condition.255 Evaluates conditional filtering density \f$f(rv|rvc,data)\f$ for a given \c rvc which is specified in each step by calling function \c condition. 245 256 246 257 This is an interface class used to assure that certain BM has operation \c condition .