Changeset 427


Ignore:
Timestamp:
Dec 8, 2005, 4:46:24 PM (18 years ago)
Author:
Peter
Message:

modified Averagers so their size in unsigned

Location:
trunk/lib/statistics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/statistics/Averager.h

    r420 r427  
    5858    /// @return Number of data points
    5959    ///
    60     inline long n(void) const { return n_; }
     60    inline unsigned long  n(void) const { return n_; }
    6161
    6262    ///
     
    123123
    124124  private:
    125     long  n_;
     125    unsigned long n_;
    126126    double  x_, xx_;
    127127  };
  • trunk/lib/statistics/AveragerPair.h

    r420 r427  
    3232    ///
    3333    inline AveragerPair(const double x, const double xx, const double y,
    34                         const double yy, const double xy, const long n)
     34                        const double yy, const double xy, const unsigned long n)
    3535      : x_(Averager(x,xx,n)), y_(Averager(y,yy,n)), xy_(xy) {}
    3636
     
    4444    /// Adding \a n pairs of data points with value \a x and \a y.
    4545    ///
    46     inline void add(const double x, const double y, const long n=1)
     46    inline void add(const double x, const double y, const unsigned long n=1)
    4747      { x_.add(x,n); y_.add(y,n), xy_ += n*x*y; }
    4848
     
    9494    /// @return The number of pair of data points.
    9595    ///
    96     inline long n(void) const { return x_.n(); }
     96    inline unsigned long n(void) const { return x_.n(); }
    9797
    9898    ///
Note: See TracChangeset for help on using the changeset viewer.