Changeset 703 for trunk/yat/statistics/Averager.h
- Timestamp:
- Dec 18, 2006, 1:47:44 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/statistics/Averager.h
r680 r703 62 62 /// Adding \a n (default=1) number of data point(s) with value \a d. 63 63 /// 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); 65 65 66 66 /// … … 95 95 96 96 /// 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$, 98 100 /// \f$ \forall x_i^2 \rightarrow a^2*x_i^2 \f$ 99 101 /// 100 inline void rescale(double a) { x_*=a; xx_*=a*a; }102 inline void rescale(double a); 101 103 102 104 /// … … 107 109 108 110 /// 109 /// The standard deviation is defined as the square root of the110 /// variance.111 /// @brief The standard deviation is defined as the square root of 112 /// the variance. 111 113 /// 112 114 /// @return The standard deviation, root of the variance(). … … 115 117 116 118 /// 117 /// The standard deviation is defined as the square root of the118 /// variance.119 /// @brief The standard deviation is defined as the square root of 120 /// the variance. 119 121 /// 120 122 /// @return Standard deviation around \a m, root of the variance(m). … … 138 140 139 141 /// 142 /// @brief The variance with know mean 143 /// 144 /// The variance is calculated as 140 145 /// \f$ \frac{1}{n}\sum (x_i-m)^2 \f$. 141 146 /// … … 146 151 147 152 /// 153 /// @brief The estimated variance 154 /// 148 155 /// The variance is calculated as \f$ \frac{1}{N}\sum_i 149 156 /// (x_i-m)^2 \f$, where \f$ m \f$ is the mean. 150 157 /// 151 /// @return estimation of variance158 /// @return Estimation of variance 152 159 /// 153 160 inline double variance(void) const … … 166 173 167 174 /// 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&); 177 183 178 184 ///
Note: See TracChangeset
for help on using the changeset viewer.