Changeset 433
- Timestamp:
- Dec 13, 2005, 3:51:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/statistics/Averager.h
r427 r433 4 4 #define _theplu_statistics_averager_ 5 5 6 #include <c++_tools/gslapi/vector.h> 7 6 8 #include <cmath> 7 9 8 10 namespace theplu{ 9 namespace gslapi{10 class vector;11 }12 11 13 12 namespace statistics{ … … 44 43 /// 45 44 inline void add(const double d,const long n=1) { n_+=n; x_+=n*d; xx_+=n*d*d;} 45 46 /// 47 /// Adding each value in vector \a v \a n (default=1) 48 /// number of times. 49 /// 50 inline void add(const gslapi::vector& v, const long n=1) 51 { n_+=n*v.size(); x_+=n*v.sum(); xx_+=n*(v*v);} 52 46 53 47 54 ///
Note: See TracChangeset
for help on using the changeset viewer.