Ignore:
Timestamp:
Dec 18, 2006, 1:47:44 AM (16 years ago)
Author:
Jari Häkkinen
Message:

Addresses #65 and #170.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/Averager.h

    r680 r703  
    6262    /// Adding \a n (default=1) number of data point(s) with value \a d.
    6363    ///
    64     inline void add(double d, u_long n=1) { n_+=n; x_+=n*d; xx_+=n*d*d;}
     64    void add(double d, u_long n=1);
    6565
    6666    ///
     
    9595
    9696    ///
    97     /// Rescales the object, \f$ \forall x_i \rightarrow a*x_i \f$,
     97    /// @brief Rescales the object
     98    ///
     99    /// \f$ \forall x_i \rightarrow a*x_i \f$,
    98100    /// \f$ \forall x_i^2 \rightarrow a^2*x_i^2 \f$
    99101    ///
    100     inline void rescale(double a) { x_*=a; xx_*=a*a; }
     102    inline void rescale(double a);
    101103
    102104    ///
     
    107109
    108110    ///
    109     /// The standard deviation is defined as the square root of the
    110     /// variance.
     111    /// @brief The standard deviation is defined as the square root of
     112    /// the variance.
    111113    ///
    112114    /// @return The standard deviation, root of the variance().
     
    115117
    116118    ///
    117     /// The standard deviation is defined as the square root of the
    118     /// variance.
     119    /// @brief The standard deviation is defined as the square root of
     120    /// the variance.
    119121    ///
    120122    /// @return Standard deviation around \a m, root of the variance(m).
     
    138140
    139141    ///
     142    /// @brief The variance with know mean
     143    ///
     144    /// The variance is calculated as
    140145    /// \f$ \frac{1}{n}\sum (x_i-m)^2 \f$.
    141146    ///
     
    146151
    147152    ///
     153    /// @brief The estimated variance
     154    ///
    148155    /// The variance is calculated as \f$ \frac{1}{N}\sum_i
    149156    /// (x_i-m)^2 \f$, where \f$ m \f$ is the mean.
    150157    ///
    151     /// @return estimation of variance
     158    /// @return Estimation of variance
    152159    ///
    153160    inline double variance(void) const
     
    166173
    167174    ///
    168     /// Resets everything to zero
    169     ///
    170     inline void reset(void) { n_=0; x_=xx_=0.0;}
    171 
    172     ///
    173     /// The assignment operator
    174     ///
    175     inline const Averager& operator=(const Averager& a)
    176       { n_=a.n_; x_=a.x_; xx_=a.xx_; return *this; }
     175    /// @brief Reset everything to zero
     176    ///
     177    void reset(void);
     178
     179    ///
     180    /// @brief The assignment operator
     181    ///
     182    const Averager& operator=(const Averager&);
    177183
    178184    ///
Note: See TracChangeset for help on using the changeset viewer.