Ignore:
Timestamp:
Sep 29, 2007, 4:18:52 AM (14 years ago)
Author:
Peter
Message:

refactoring add function in Averagers, refs #246

File:
1 edited

Legend:

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

    r911 r914  
    200200  void add(Averager& a, Iter first, Iter last)
    201201  {
    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   {
     202    utility::check_iterator_is_unweighted(first);
    212203    for ( ; first != last; ++first)
    213204      a.add(*first);
    214205  }
    215 
    216206
    217207  // Template implementations
Note: See TracChangeset for help on using the changeset viewer.