Changeset 912 for trunk/yat/statistics


Ignore:
Timestamp:
Sep 29, 2007, 2:53:06 AM (14 years ago)
Author:
Peter
Message:

Made add function for AveragerPair? no longer accept weighted iterators. refs #246

File:
1 edited

Legend:

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

    r886 r912  
    2727*/
    2828
     29#include "yat/utility/IteratorTraits.h"
     30
    2931#include "Averager.h"
     32
     33#include "yat/utility/IteratorTraits.h"
    3034
    3135#include <cmath>
     
    175179  void add(AveragerPair& ap, Iter1 first1, Iter1 last1, Iter2 first2)
    176180  {
     181    add(ap, first1, last1, first2,
     182        typename utility::weighted_iterator_traits<Iter1>::type(),
     183        typename utility::weighted_iterator_traits<Iter2>::type());
     184  }
     185
     186  // unweighted impl. (weighted version is not implemented and should
     187  // not compile)
     188  template <typename Iter1, typename Iter2>
     189  void add(AveragerPair& ap, Iter1 first1, Iter1 last1, Iter2 first2,
     190           utility::unweighted_type type1, utility::unweighted_type type2)
     191  {
    177192    for ( ; first1 != last1; ++first1, ++first2)
    178193      ap.add(*first1, *first2);
Note: See TracChangeset for help on using the changeset viewer.