Ignore:
Timestamp:
May 12, 2008, 10:21:19 AM (14 years ago)
Author:
Jari Häkkinen
Message:

Reverting changes that break the interface of Averager and AveragerPair? classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4-stable/yat/statistics/Averager.cc

    r1290 r1294  
    44  Copyright (C) 2004, 2005 Jari Häkkinen, Peter Johansson
    55  Copyright (C) 2006 Jari Häkkinen, Markus Ringnér
    6   Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     7  Copyright (C) 2008 Peter Johansson
    78
    89  This file is part of the yat library, http://trac.thep.lu.se/yat
     
    3839  }
    3940
    40   Averager::Averager(double x, double xx, long n)
     41  Averager::Averager(double x, double xx, unsigned long n)
    4142    : n_(n), x_(x), xx_(xx)
    4243  {
     
    4849  }
    4950
    50   void Averager::add(double d, long n)
     51  void Averager::add(double d, unsigned long n)
    5152  {
    5253    assert(!std::isnan(d));
    5354    n_  += n;
    54     assert(n>-1);
    5555    x_  += n*d;
    5656    xx_ += n*d*d;
     
    6767  }
    6868
    69   long Averager::n(void) const
     69  unsigned long Averager::n(void) const
    7070  {
    7171    return n_;
Note: See TracChangeset for help on using the changeset viewer.