Changeset 165
 Timestamp:
 Sep 23, 2004, 9:32:12 AM (17 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/AveragerPair.h
r138 r165 90 90 /// 91 91 inline double correlation(void) const 92 { return (n()>1) ? (covariance() / (x_.std()*y_.std()) ) : 0; } 92 { return (x_.std()>0 && y_.std()>0) ? 93 (covariance() / (x_.std()*y_.std()) ) : 0; } 93 94 94 95 /// 95 96 /// The covariance is calculated using the (n1) correction, which 96 /// means it is the best unbiased estimator of the covariance \f$97 /// \frac{1}{N1}\sum_i (x_im_x)(y_im_y)\f$, where \f$m\f$ is the98 /// mean@return covariance97 /// means it is the best unbiased estimator of the covariance \f$ 98 /// \frac{1}{N1}\sum_i (x_im_x)(y_im_y)\f$, where \f$m\f$ is the 99 /// mean. @return covariance 99 100 /// 100 101 inline double covariance(void) const
Note: See TracChangeset
for help on using the changeset viewer.