Changeset 899 for trunk/yat/statistics
- Timestamp:
- Sep 26, 2007, 11:26:25 PM (16 years ago)
- Location:
- trunk/yat/statistics
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/statistics/AveragerPairWeighted.cc
r890 r899 96 96 double AveragerPairWeighted::msd(void) const 97 97 { 98 return sum_squared_deviation()/w_; 98 return (x_.sum_wxx()+y_.sum_wxx()-2*wxy_)/w_; 99 } 100 101 102 double AveragerPairWeighted::n(void) const 103 { 104 return x_.n(); 99 105 } 100 106 … … 105 111 } 106 112 107 double AveragerPairWeighted::sum_squared_deviation(void) const108 {109 return x_.sum_wxx()+y_.sum_wxx()-2*wxy_;110 }111 112 113 113 114 double AveragerPairWeighted::sum_w(void) const -
trunk/yat/statistics/AveragerPairWeighted.h
r892 r899 127 127 double msd(void) const; 128 128 129 /** 130 @return \f$ \frac{\left(\sum w_x w_y\right)^2}{\sum w_x^2w_y^2} \f$ 131 */ 132 double n(void) const; 133 129 134 /// 130 135 /// @brief Reset everything to zero 131 136 /// 132 137 void reset(void); 133 134 /**135 @return Sum of weighted squared deviation between x and y \f$136 \sum w_xw_y (x-y)^2 \f$137 138 \note This function is not invariant under rescaling of weights.139 */140 double sum_squared_deviation(void) const;141 138 142 139 /// -
trunk/yat/statistics/euclidean_vector_distance.h
r898 r899 54 54 AveragerPairWeighted ap; 55 55 add(ap,beg1,end1,beg2); 56 return sqrt(ap. sum_squared_deviation());56 return sqrt(ap.n()*ap.msd()); 57 57 } 58 58
Note: See TracChangeset
for help on using the changeset viewer.