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

Last change on this file since 295 was 295, checked in by Peter, 17 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: 774 bytes
Line 
1// $Id: AveragerPair.cc 295 2005-04-29 09:15:58Z peter $
2
3#include <c++_tools/statistics/AveragerPair.h>
4#include <c++_tools/statistics/Averager.h>
5
6#include <utility>
7
8namespace theplu {
9namespace statistics{
10 
11
12  AveragerPair::AveragerPair(void)
13    : x_(Averager()), y_(Averager()), xy_(0.0)
14  {
15  }
16
17  AveragerPair::AveragerPair(const double x, const double xx, const double y, 
18                     const double yy, const double xy, const long n)
19    : x_(Averager(x,xx,n)), y_(Averager(y,yy,n)), xy_(xy)
20  {
21  }
22
23  AveragerPair::AveragerPair(const AveragerPair& a)
24    : x_(a.x_averager()), y_(a.y_averager()), xy_(a.sum_xy())
25  {
26  }
27
28  const AveragerPair& AveragerPair::operator+=(const AveragerPair& a)
29  {
30    x_+=a.x_averager();
31    y_+=a.y_averager();
32    xy_+=a.sum_xy();
33    return *this;
34  }
35
36}} // of namespace statistics and namespace theplu
Note: See TracBrowser for help on using the repository browser.