Changeset 96


Ignore:
Timestamp:
Jun 9, 2004, 6:30:07 PM (18 years ago)
Author:
Peter
Message:

reset added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/WeightedAverager.h

    r95 r96  
    5252 
    5353    ///
     54    /// resets everything to zero
     55    ///
     56    inline void reset(void) { wx_.reset(); w_.reset(); wwx_=0;}
     57
     58    ///
    5459    /// Calculating the squared error according to: \f$ \frac{\sum
    5560    /// w_i^2(x_i-m)^2}{(\sum w_i)^2} \f$ @return squared error
     
    100105    ///
    101106    inline WeightedAverager operator+=(WeightedAverager a)
    102     { wx_+=a.wx(); w_+=a.w(); return *this; }
     107    { wx_+=a.wx(); w_+=a.w(); wwx_+=a.sum_wwx(); return *this; }
     108
     109    ///
     110    /// operator to rescale object, i.e. each data point is rescaled
     111    /// \f$ x = d * x \f$
     112    ///
     113    inline WeightedAverager operator*=(double d)
     114    { wx_*=d; wwx_*=d; return *this; }
    103115
    104116
Note: See TracChangeset for help on using the changeset viewer.