# Changeset 899

Ignore:
Timestamp:
Sep 26, 2007, 11:26:25 PM (15 years ago)
Message:

changed euclidean to fulfill design criteria, removes sum_squared_deviation from AveragerPairWeighted?, also changed vector::sort to use stl rather than gsl. refs #248 and fixes #253

Location:
trunk/yat
Files:
5 edited

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

 r890 double AveragerPairWeighted::msd(void) const { return sum_squared_deviation()/w_; return (x_.sum_wxx()+y_.sum_wxx()-2*wxy_)/w_; } double AveragerPairWeighted::n(void) const { return x_.n(); } } double AveragerPairWeighted::sum_squared_deviation(void) const { return x_.sum_wxx()+y_.sum_wxx()-2*wxy_; } double AveragerPairWeighted::sum_w(void) const
• ## trunk/yat/statistics/AveragerPairWeighted.h

 r892 double msd(void) const; /** @return \f$\frac{\left(\sum w_x w_y\right)^2}{\sum w_x^2w_y^2} \f$ */ double n(void) const; /// /// @brief Reset everything to zero /// void reset(void); /** @return Sum of weighted squared deviation between x and y \f$\sum w_xw_y (x-y)^2 \f$ \note This function is not invariant under rescaling of weights. */ double sum_squared_deviation(void) const; ///
• ## trunk/yat/statistics/euclidean_vector_distance.h

 r898 AveragerPairWeighted ap; add(ap,beg1,end1,beg2); return sqrt(ap.sum_squared_deviation()); return sqrt(ap.n()*ap.msd()); }
• ## trunk/yat/utility/vector.cc

 r880 #include "yat/random/random.h" #include #include #include { assert(v.gsl_vector_p()); gsl_sort_vector(v.gsl_vector_p()); std::sort(v.begin(), v.end()); }
• ## trunk/yat/utility/vector.h

 r882 /** Sort the elements in the vector. \note Bug in GSL: if the vector contains one ore more NaNs the call never returns. */ void sort(vector&);
Note: See TracChangeset for help on using the changeset viewer.