Changeset 718 for trunk/yat/statistics/AveragerPair.h

Ignore:
Timestamp:
Dec 26, 2006, 10:56:26 AM (16 years ago)
Message:

 r705 /// @return Concordence correlation coefficient. /// inline double ccc(void) const { return ( (x_.variance() && y_.variance() && (x_.mean()-y_.mean()) ) ? ((2*covariance()) / ((x_.variance()+y_.variance()) + (x_.mean()-y_.mean())*(x_.mean()-y_.mean()))) : 0); } double ccc(void) const; /// /// \f$\frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sqrt{\sum_i /// @return Pearson correlation coefficient. /// inline double correlation(void) const { return ((x_.std()>0 && y_.std()>0) ? (covariance() / (x_.std()*y_.std()) ) : 0); } double correlation(void) const; /// /// @return The covariance. /// inline double covariance(void) const { return (n()>1) ? (xy_ - x_.sum_x()*y_.mean()) / n(): 0; } double covariance(void) const; /// /// @return The mean of xy. /// inline double mean_xy(void) const { return xy_/n(); } double mean_xy(void) const; /// /// \frac{1}{N} \sum (x-y)^2 \f$ /// inline double msd() const {return ( x_averager().sum_xx()+y_averager().sum_xx()-2*sum_xy() )/n();} double msd(void) const; /// /// @return The number of pair of data points. /// inline unsigned long n(void) const { return x_.n(); } unsigned long n(void) const; /// /// @return The sum of xy. /// inline double sum_xy(void) const { return xy_; } double sum_xy(void) const; /// /// @return \f$\sum_i (x_i-m_x)(y_i-m_y) \f$ /// inline double sum_xy_centered(void) const {return xy_-x_.sum_x()*y_.mean();} double sum_xy_centered(void) const; /// /// @return A const refencer to the averager object for x. /// inline const Averager& x_averager(void) const { return x_; } const Averager& x_averager(void) const; /// /// @return A const reference to the averager object for y /// inline const Averager& y_averager(void) const { return y_; } const Averager& y_averager(void) const; ///