Changeset 3529


Ignore:
Timestamp:
Oct 11, 2016, 9:50:26 AM (7 years ago)
Author:
Peter
Message:

refs #803. use new iterator concept in AveragerPair?

File:
1 edited

Legend:

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

    r2565 r3529  
    3131
    3232#include <boost/concept_check.hpp>
     33#include <boost/iterator/iterator_concepts.hpp>
    3334
    3435#include <cmath>
     
    6768
    6869       \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sum_i
    69        (x_i-m_x)^2+\sum_i (y_i-m_y)^2 + n(m_x-m_y)^2} \f$ 
    70        
     70       (x_i-m_x)^2+\sum_i (y_i-m_y)^2 + n(m_x-m_y)^2} \f$
     71
    7172    */
    7273    double ccc(void) const;
     
    7475    /**
    7576       \f$ \frac{\sum_i (x_i-m_x)(y_i-m_y)}{\sqrt{\sum_i
    76        (x_i-m_x)^2\sum_i (y_i-m_y)^2}} \f$ 
    77        
     77       (x_i-m_x)^2\sum_i (y_i-m_y)^2}} \f$
     78
    7879       \return %Pearson correlation coefficient.
    7980    */
    8081    double correlation(void) const;
    81  
     82
    8283    ///
    8384    /// Calculating covariance using
     
    8889    ///
    8990    double covariance(void) const;
    90  
     91
    9192    ///
    9293    /// @return The mean of xy.
     
    157158     \brief adding data from two ranges to AveragerPair \a ap
    158159
     160     Type Requirements:
     161     - \c InputIterator1 is \readable_iterator
     162     - \c InputIterator1 is unweighted
     163     - \c InputIterator1 is \single_pass_iterator
     164     - \c InputIterator2 is \readable_iterator
     165     - \c InputIterator2 is unweighted
     166     - \c InputIterator2 is \single_pass_iterator
     167
    159168     \relates AveragerPair
    160169   */
    161170  template <class InputIterator1, class InputIterator2>
    162   void add(AveragerPair& ap, InputIterator1 first1, InputIterator1 last1, 
     171  void add(AveragerPair& ap, InputIterator1 first1, InputIterator1 last1,
    163172           InputIterator2 first2)
    164173  {
    165     BOOST_CONCEPT_ASSERT((boost::InputIterator<InputIterator1>));
    166     BOOST_CONCEPT_ASSERT((boost::InputIterator<InputIterator2>));
     174    BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<InputIterator1>));
     175    BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<InputIterator1>));
     176    BOOST_CONCEPT_ASSERT((boost_concepts::ReadableIterator<InputIterator2>));
     177    BOOST_CONCEPT_ASSERT((boost_concepts::SinglePassIterator<InputIterator2>));
     178
    167179    utility::check_iterator_is_unweighted(first1);
    168180    utility::check_iterator_is_unweighted(first2);
Note: See TracChangeset for help on using the changeset viewer.