# Changeset 703 for trunk/yat/statistics/Averager.h

Ignore:
Timestamp:
Dec 18, 2006, 1:47:44 AM (16 years ago)
Message:

 r680 /// Adding \a n (default=1) number of data point(s) with value \a d. /// inline void add(double d, u_long n=1) { n_+=n; x_+=n*d; xx_+=n*d*d;} void add(double d, u_long n=1); /// /// /// Rescales the object, \f$\forall x_i \rightarrow a*x_i \f$, /// @brief Rescales the object /// /// \f$\forall x_i \rightarrow a*x_i \f$, /// \f$\forall x_i^2 \rightarrow a^2*x_i^2 \f$ /// inline void rescale(double a) { x_*=a; xx_*=a*a; } inline void rescale(double a); /// /// /// The standard deviation is defined as the square root of the /// variance. /// @brief The standard deviation is defined as the square root of /// the variance. /// /// @return The standard deviation, root of the variance(). /// /// The standard deviation is defined as the square root of the /// variance. /// @brief The standard deviation is defined as the square root of /// the variance. /// /// @return Standard deviation around \a m, root of the variance(m). /// /// @brief The variance with know mean /// /// The variance is calculated as /// \f$\frac{1}{n}\sum (x_i-m)^2 \f$. /// /// /// @brief The estimated variance /// /// The variance is calculated as \f$\frac{1}{N}\sum_i /// (x_i-m)^2 \f$, where \f$m \f$ is the mean. /// /// @return estimation of variance /// @return Estimation of variance /// inline double variance(void) const /// /// Resets everything to zero /// inline void reset(void) { n_=0; x_=xx_=0.0;} /// /// The assignment operator /// inline const Averager& operator=(const Averager& a) { n_=a.n_; x_=a.x_; xx_=a.xx_; return *this; } /// @brief Reset everything to zero /// void reset(void); /// /// @brief The assignment operator /// const Averager& operator=(const Averager&); ///