Changeset 3529
- Timestamp:
- Oct 11, 2016, 9:50:26 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/statistics/AveragerPair.h
r2565 r3529 31 31 32 32 #include <boost/concept_check.hpp> 33 #include <boost/iterator/iterator_concepts.hpp> 33 34 34 35 #include <cmath> … … 67 68 68 69 \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 71 72 */ 72 73 double ccc(void) const; … … 74 75 /** 75 76 \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 78 79 \return %Pearson correlation coefficient. 79 80 */ 80 81 double correlation(void) const; 81 82 82 83 /// 83 84 /// Calculating covariance using … … 88 89 /// 89 90 double covariance(void) const; 90 91 91 92 /// 92 93 /// @return The mean of xy. … … 157 158 \brief adding data from two ranges to AveragerPair \a ap 158 159 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 159 168 \relates AveragerPair 160 169 */ 161 170 template <class InputIterator1, class InputIterator2> 162 void add(AveragerPair& ap, InputIterator1 first1, InputIterator1 last1, 171 void add(AveragerPair& ap, InputIterator1 first1, InputIterator1 last1, 163 172 InputIterator2 first2) 164 173 { 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 167 179 utility::check_iterator_is_unweighted(first1); 168 180 utility::check_iterator_is_unweighted(first2);
Note: See TracChangeset
for help on using the changeset viewer.