Changeset 85

Show
Ignore:
Timestamp:
04/28/08 10:21:21 (16 years ago)
Author:
smidl
Message:

compilation and documantation fixes

Location:
bdm
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • bdm/estim/libKF.h

    r83 r85  
    262262                A ( dimx,dimx ), B ( dimx,dimu ), C ( dimy,dimx ), D ( dimy,dimu ), 
    263263                Q(dimx), R(dimy), 
    264                 est ( rv ), fy ( rvy ), _mu(est._mu()), _P(est._R()), _yp(fy._mu()),_Ry(fy._R()) { 
     264                est ( rv ), fy ( rvy ), _yp(fy._mu()),_Ry(fy._R()), _mu(est._mu()), _P(est._R()) { 
    265265 
    266266        this->set_parameters ( K0.A, K0.B, K0.C, K0.D, K0.R, K0.Q ); 
     
    279279                A ( dimx,dimx ), B ( dimx,dimu ), C ( dimy,dimx ), D ( dimy,dimu ), 
    280280                Q(dimx), R (dimy), 
    281                 est ( rvx ), fy ( rvy ), _mu(est._mu()), _P(est._R()), _yp(fy._mu()),_Ry(fy._R()) { 
     281                est ( rvx ), fy ( rvy ),  _yp(fy._mu()),_Ry(fy._R()),_mu(est._mu()), _P(est._R()) { 
    282282}; 
    283283 
  • bdm/math/libDC.h

    r75 r85  
    149149                vec sqrt_mult (const vec &v ) const {mat Ch=chol(M); return Ch*v;}; 
    150150 
     151                //! Add another matrix in fsq form with weight w 
     152                void add ( const fsqmat &fsq2, double w=1.0 ){M+=fsq2.M;}; 
     153 
    151154                //! Access functions 
    152155                void setD (const vec &nD){M=diag(nD);} 
     
    155158                //! Access functions 
    156159                void setD (const vec &nD, int i){for(int j=i;j<nD.length();j++){M(j,j)=nD(j-i);}} //Fixme can be more general 
     160 
    157161 
    158162                //! add another fsqmat matrix 
  • bdm/stat/libBM.cpp

    r32 r85  
    2424        sizes = in_sizes; 
    2525        times = in_times; 
    26         size = 0; 
    27         for(i=0;i<len;i++){size+=sizes(i);} 
     26        tsize = 0; 
     27        for(i=0;i<len;i++){tsize+=sizes(i);} 
    2828}; 
    2929 
     
    3232} 
    3333 
    34 RV::RV () : size(0),len(0){}; 
     34RV::RV () : tsize(0),len(0){}; 
    3535 
    3636void RV::add (const RV &rv2) { 
    3737        // TODO 
    38         size+=rv2.size; 
     38        tsize+=rv2.tsize; 
    3939        len +=rv2.len; 
    4040        ids=concat(ids,rv2.ids); 
     
    7878 
    7979ivec RV::indexlist(){ 
    80         ivec indlist(size); 
     80        ivec indlist(tsize); 
    8181        int i; 
    8282        int pos = 0; 
  • bdm/stat/libBM.h

    r62 r85  
    2828protected: 
    2929        //! size = sum of sizes 
    30         int size; 
     30        int tsize; 
    3131        //! len = number of individual rvs 
    3232        int len; 
     
    5454        friend std::ostream &operator<< ( std::ostream &os, const RV &rv ); 
    5555 
    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;} ; 
    5860 
    5961        //TODO why not inline and later?? 
     
    6264        ivec find ( RV rv2 ); 
    6365        //! Add (concat) another variable to the current one 
    64         void add (const RV &rv2 ); 
     66        void add (const RV &rv2 ); 
    6567        //! Add (concat) another variable to the current one 
    6668        friend RV concat (const RV &rv1, const RV &rv2 ); 
     
    7880        //!access function 
    7981        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 
    8495 
    8596class fnc { 
     
    90101        //!default constructor 
    91102        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 
    93104        virtual vec eval ( const vec &cond ) { 
    94105                return vec ( 0 ); 
     
    199210        void linkrvs ( RV &drv, RV &urv ); 
    200211 
    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. 
    202213        void step(); 
    203214 
     
    242253\brief Conditional Bayesian Filter 
    243254 
    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. 
     255Evaluates 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. 
    245256 
    246257This is an interface class used to assure that certain BM has operation \c condition . 
  • bdm/stat/libDS.h

    r33 r85  
    2222* \brief Class representing off-line data stored in memory 
    2323 
    24 The data are stored in an internal matrix \c Data . Each column of Data corresponds to one discrete time observation $t$. Access to this matrix is via indexes \c rowid and \c delays. 
     24The data are stored in an internal matrix \c Data . Each column of Data corresponds to one discrete time observation \f$t\f$. Access to this matrix is via indexes \c rowid and \c delays. 
    2525 
    2626The data can be loaded from a file. 
  • bdm/stat/libEF.h

    r77 r85  
    191191 \brief Normal distributed linear function with linear function of mean value; 
    192192 
    193  Mean value $mu=A*rvc$. 
     193 Mean value \f$mu=A*rvc\f$. 
    194194*/ 
    195195template<class sq_T> 
     
    197197        //! Internal epdf that arise by conditioning on \c rvc 
    198198        enorm<sq_T> epdf; 
     199        mat A; 
    199200        vec& _mu; //cached epdf.mu; 
    200         mat A; 
    201201public: 
    202202        //! Constructor 
     
    216216 
    217217Mean value, \f$\mu\f$, of this density is given by \c rvc . 
    218 Standard deviation of the random walk is proportional to one $k$-th the mean. 
     218Standard deviation of the random walk is proportional to one \f$k\f$-th the mean. 
    219219This is achieved by setting \f$\alpha=k\f$ and \f$\beta=k/\mu\f$. 
    220220 
     
    225225        //! Internal epdf that arise by conditioning on \c rvc 
    226226        egamma epdf; 
    227         //! Constant $k$ 
     227        //! Constant \f$k\f$ 
    228228        double k; 
    229229        //! cache of epdf.beta 
     
    245245\brief  Gamma random walk around a fixed point 
    246246 
    247 Mean value, \f$\mu\f$, of this density is given by a geometric combination of \c rvc and given fixed point, $p$. $k$ is the coefficient of the geometric combimation 
     247Mean value, \f$\mu\f$, of this density is given by a geometric combination of \c rvc and given fixed point, \f$p\f$. \f$l\f$ is the coefficient of the geometric combimation 
    248248\f[ \mu = \mu_{t-1} ^{l} p^{1-l}\f] 
    249249 
    250 Standard deviation of the random walk is proportional to one $k$-th the mean. 
     250Standard deviation of the random walk is proportional to one \f$k\f$-th the mean. 
    251251This is achieved by setting \f$\alpha=k\f$ and \f$\beta=k/\mu\f$. 
    252252 
     
    280280        //! Number of particles 
    281281        int n; 
    282         //! Sample weights $w$ 
     282        //! Sample weights \f$w\f$ 
    283283        vec w; 
    284284        //! Samples \f$x^{(i)}, i=1..n\f$ 
  • bdm/stat/libFN.h

    r62 r85  
    1818using namespace itpp; 
    1919 
    20 //! class representing function $f(x) = a$, here rv is empty 
     20//! class representing function \f$f(x) = a\f$, here \c rv is empty 
    2121class constfn : public fnc 
    2222{ 
     
    3232}; 
    3333 
    34 //! Class representing function $f(x) = Ax+B$ 
     34//! Class representing function \f$f(x) = Ax+B\f$ 
    3535class linfn: public fnc 
    3636{ 
    37                 //! Identification of $x$ 
     37                //! Identification of \f$x\f$ 
    3838                RV rv; 
    3939                //! Matrix A 
     
    5353 
    5454/*! 
    55 \brief Class representing a differentiable function of two variables $f(x,u)$. 
     55\brief Class representing a differentiable function of two variables \f$f(x,u)\f$. 
    5656 
    5757Function of two variables. 
     
    7373                int dimu; 
    7474        public: 
    75                 //! Evaluates $f(x0,u0)$ (VS: Do we really need common eval? ) 
     75                //! Evaluates \f$f(x0,u0)\f$ (VS: Do we really need common eval? ) 
    7676                vec eval ( const vec &cond ) 
    7777                { 
     
    8080                }; 
    8181 
    82                 //! Evaluates $f(x0,u0)$ 
     82                //! Evaluates \f$f(x0,u0)\f$ 
    8383                virtual vec eval ( const vec &x0, const vec &u0 ) {return zeros ( dimy );}; 
    84                 //! Evaluates \f$A=\frac{d}{dx}f(x,u)|_{x0,u0}\f$ and writes result into \c A . @param full denotes that even unchanged entries are to be rewritten. When, false only the changed elements are computed. @param x0 numeric value of $x$, @param u0 numeric value of $u$ @param A a place where the result will be stored. 
     84                //! Evaluates \f$A=\frac{d}{dx}f(x,u)|_{x0,u0}\f$ and writes result into \c A . @param full denotes that even unchanged entries are to be rewritten. When, false only the changed elements are computed. @param x0 numeric value of \f$x\f$, @param u0 numeric value of \f$u\f$ @param A a place where the result will be stored. 
    8585                virtual void dfdx_cond ( const vec &x0, const vec &u0, mat &A , bool full=true ) {}; 
    86                 //! Evaluates \f$A=\frac{d}{du}f(x,u)|_{x0,u0}\f$ and writes result into \c A . @param full denotes that even unchanged entries are to be rewritten. When, false only the changed elements are computed.        @param x0 numeric value of $x$, @param u0 numeric value of $u$ @param A a place where the result will be stored. 
     86                //! Evaluates \f$A=\frac{d}{du}f(x,u)|_{x0,u0}\f$ and writes result into \c A . @param full denotes that even unchanged entries are to be rewritten. When, false only the changed elements are computed.        @param x0 numeric value of \f$x\f$, @param u0 numeric value of \f$u\f$ @param A a place where the result will be stored. 
    8787                virtual void dfdu_cond ( const vec &x0, const vec &u0, mat &A, bool full=true ) {}; 
    8888                //!Default constructor (dimy is not set!) 
     
    9494}; 
    9595 
    96 //! Class representing function $f(x,u) = Ax+Bu$ 
     96//! Class representing function \f$f(x,u) = Ax+Bu\f$ 
    9797//TODO can be generalized into multilinear form! 
    9898class bilinfn: public diffbifn