Ignore:
Timestamp:
Feb 6, 2008, 8:30:03 PM (14 years ago)
Author:
Peter
Message:

fixing #128 - iterators in Averger classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/AveragerPair.h

    r1000 r1043  
    7070    void add(const double x, const double y, const unsigned long n=1);
    7171
    72     ///
    73     /// Adding pairs of arrays with data points \a x and \a y.
    74     ///
    75     /// The requirements for the types T1 and T2 of the arrays \a x
    76     /// and \a y are: operator[] returning an element and function
    77     /// size() returning the number of elements.
    78     ///   
    79     template <typename T1, typename T2>
    80     void add_values(const T1& x, const T2& y);
    81 
    82     ///
    83     /// \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sum_i
    84     /// (x_i-m_x)^2+\sum_i (y_i-m_y)^2 + n(m_x-m_y)^2} \f$
    85     ///
    86     /// In case of a zero denominator - zero is returned.
    87     ///
    88     /// @return Concordence correlation coefficient.
    89     ///
     72    /**
     73       \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sum_i
     74       (x_i-m_x)^2+\sum_i (y_i-m_y)^2 + n(m_x-m_y)^2} \f$
     75       
     76       In case of a zero denominator - zero is returned.
     77       
     78       @return Concordence correlation coefficient.
     79    */
    9080    double ccc(void) const;
    9181
     
    172162
    173163  /**
    174      \brief adding a ranges of values to AveragerPair \a ap
     164     \brief adding data from two ranges to AveragerPair \a ap
    175165   */
    176166  template <class Iter1, class Iter2>
     
    184174
    185175
    186   // Template implementations
    187   template <typename T1, typename T2>
    188   void AveragerPair::add_values(const T1& x, const T2& y)
    189   {
    190     for (size_t i=0; i<x.size(); i++)
    191       add(x[i],y[i]);
    192   }
    193 
    194 
    195176}}} // of namespace statistics, yat, and theplu
    196177
Note: See TracChangeset for help on using the changeset viewer.