source: trunk/lib/statistics/Averager.cc @ 295

Last change on this file since 295 was 295, checked in by Peter, 18 years ago

file structure modifications. NOTE, this revision is not working, please wait for the next...

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 583 bytes
Line 
1// $Id: Averager.cc 295 2005-04-29 09:15:58Z peter $
2
3#include <c++_tools/statistics/Averager.h>
4#include <c++_tools/gslapi/vector.h>
5
6#include <sys/types.h>
7#include <ostream>
8
9namespace theplu {
10namespace statistics{
11 
12
13  Averager::Averager(void)
14    : n_(0), x_(0), xx_(0)
15  {
16  }
17
18  Averager::Averager(const double x,const double xx,const long n)
19    : n_(n), x_(x), xx_(xx)
20  {
21  }
22
23  Averager::Averager(const Averager& a)
24    : n_(a.n_), x_(a.x_), xx_(a.xx_)
25  {
26  }
27
28  const Averager& Averager::operator+=(const Averager& a)
29  {
30    n_+=a.n_;
31    x_+=a.x_;
32    xx_+=a.xx_;
33    return *this;
34  }
35
36}} // of namespace statistics and namespace theplu
Note: See TracBrowser for help on using the repository browser.