Ignore:
Timestamp:
Sep 30, 2007, 2:50:10 AM (14 years ago)
Author:
Peter
Message:

Sorry this commit is a bit to big.

Adding a yat_assert. The yat assert are turned on by providing a
'-DYAT_DEBUG' flag to preprocessor if normal cassert is turned
on. This flag is activated for developers running configure with
--enable-debug. The motivation is that we can use these yat_asserts in
header files and the yat_asserts will be invisible to the normal user
also if he uses C-asserts.

added output operator in DataLookup2D and removed output operator in
MatrixLookup?

Removed template function add_values in Averager and weighted version

Added function to AveragerWeighted? taking iterator to four ranges.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/IteratorTraits.h

    r914 r916  
    6161  };
    6262
     63
     64
     65  /*
     66    struct used to determine if a pair of iterators should be treated
     67    as weighted
     68
     69  template <class T1, class T2>
     70  struct weighted_iterator_traits2 {
     71    typedef weighted_type type;
     72  };
     73
     74  // but specialized to return weighted type for some things
     75  template <class T1, class T2>
     76  struct weighted_iterator_traits2<yat::utility::IteratorWeighted<U,V> > {
     77    typedef weighted_type type;
     78  };
     79  */
     80
    6381  // check (at compile time) that iterator is unweighted.
    6482  inline void check_iterator_is_unweighted(unweighted_type x){}
    6583  template <class Iter>
    6684  void check_iterator_is_unweighted(Iter iter)
    67   {check_iterator_unweighted(typename weighted_iterator_traits<Iter>::type());}
     85  { check_iterator_is_unweighted(typename
     86                                 weighted_iterator_traits<Iter>::type());
     87  }
    6888
    6989
     
    7999  template <class Iter>
    80100  double iterator_traits_data(Iter iter)
    81   { return iterator_traits_data(iter, weighted_iterator_traits<Iter>::type()); }
     101  { return iterator_traits_data(iter, typename
     102                                weighted_iterator_traits<Iter>::type()); }
    82103
    83104  template <class Iter>
     
    101122  template <class Iter>
    102123  double iterator_traits_weight(Iter iter)
    103   { return iterator_traits_data(iter, weighted_iterator_traits<Iter>::type()); }
     124  { return iterator_traits_weight(iter, typename
     125                                  weighted_iterator_traits<Iter>::type()); }
    104126
    105127  template <class Iter>
Note: See TracChangeset for help on using the changeset viewer.