Changeset 2570


Ignore:
Timestamp:
Sep 26, 2011, 3:52:39 AM (10 years ago)
Author:
Peter
Message:

add addition assignment operator in AveragerPairWeighted?

Location:
trunk/yat/statistics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/AveragerPairWeighted.cc

    r2569 r2570  
    132132  }
    133133
     134  const AveragerPairWeighted&
     135  AveragerPairWeighted::operator+=(const AveragerPairWeighted& rhs)
     136  {
     137    xy_add(rhs.x_averager().mean(), rhs.y_averager().mean(),
     138           rhs.sum_xy_centered(), rhs.sum_w());
     139    x_ += rhs.x_averager();
     140    y_ += rhs.y_averager();
     141    return *this;
     142  }
     143
     144
    134145}}} // of namespace statistics, yat, and theplu
  • trunk/yat/statistics/AveragerPairWeighted.h

    r2568 r2570  
    130130    ///
    131131    const AveragerWeighted& y_averager(void) const;
     132
     133    /**
     134       \brief Addition assignment operator.
     135
     136       \return resulting AveragerPairWeighted
     137
     138       \since New in yat 0.8
     139     */
     140    const AveragerPairWeighted& operator+=(const AveragerPairWeighted&);
    132141
    133142  private:
Note: See TracChangeset for help on using the changeset viewer.