Changeset 911


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

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

File:
1 edited

Legend:

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

    r910 r911  
    2626  02111-1307, USA.
    2727*/
     28
     29#include "yat/utility/IteratorTraits.h"
    2830
    2931#include <cmath>
     
    198200  void add(Averager& a, Iter first, Iter last)
    199201  {
     202    add(a, first, last,
     203        typename utility::weighted_iterator_traits<Iter>::type());
     204  }
     205
     206  // unweighted impl. (weighted version is not implemented and should
     207  // not compile)
     208  template <typename Iter>
     209  void add(Averager& a, Iter first, Iter last,
     210           utility::unweighted_type type)
     211  {
    200212    for ( ; first != last; ++first)
    201213      a.add(*first);
Note: See TracChangeset for help on using the changeset viewer.