Changeset 1092


Ignore:
Timestamp:
Feb 14, 2008, 10:54:19 PM (14 years ago)
Author:
Peter
Message:

fixes #329 rename weighted_type to weighted_iterator_tag

Location:
trunk/yat
Files:
4 edited

Legend:

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

    r1069 r1092  
    5656    template <typename Iter1, typename Iter2>
    5757    double distance (Iter1 beg1,Iter1 end1, Iter2 beg2,
    58                      utility::unweighted_type) const
     58                     utility::unweighted_iterator_tag) const
    5959    {
    6060      AveragerPair ap;
     
    6565    template <typename Iter1, typename Iter2>
    6666    double distance (Iter1 beg1,Iter1 end1, Iter2 beg2,
    67                      utility::weighted_type) const
     67                     utility::weighted_iterator_tag) const
    6868    {
    6969      AveragerPairWeighted ap;
  • trunk/yat/statistics/PearsonDistance.h

    r1071 r1092  
    5454    template <typename Iter1, typename Iter2>
    5555    double distance (Iter1 beg1,Iter1 end1, Iter2 beg2,
    56                      utility::unweighted_type) const
     56                     utility::unweighted_iterator_tag) const
    5757    {
    5858      AveragerPairWeighted ap;
     
    6363    template <typename Iter1, typename Iter2>
    6464    double distance (Iter1 beg1,Iter1 end1, Iter2 beg2,
    65                      utility::weighted_type) const
     65                     utility::weighted_iterator_tag) const
    6666    {
    6767      AveragerPairWeighted ap;
  • trunk/yat/utility/IteratorPolicy.h

    r1083 r1092  
    3939    typedef reference data_type;
    4040    typedef weight_t weight_type;
    41     typedef unweighted_type weighted_iterator_type;
     41    typedef unweighted_iterator_tag weighted_iterator_type;
    4242
    4343    data_type data(const Container& c, size_t row, size_t column) const
     
    6868    typedef data_t data_type;
    6969    typedef weight_t weight_type;
    70     typedef weighted_type weighted_iterator_type;
     70    typedef weighted_iterator_tag weighted_iterator_type;
    7171
    7272    data_type data(const Container& c, size_t row, size_t column) const
  • trunk/yat/utility/iterator_traits.h

    r1089 r1092  
    3333    unweighted, which is the default.
    3434   */
    35   struct unweighted_type {
    36     typedef unweighted_type type;
    37   };
     35  struct unweighted_iterator_tag {};
    3836   
    3937  /**
     
    4341    unweighted cousin).
    4442   */
    45   struct weighted_type {
    46     typedef weighted_type type;
    47   };
     43  struct weighted_iterator_tag {};
    4844
    4945  /**
     
    5450  template <class T>
    5551  struct weighted_iterator_traits {
    56     typedef unweighted_type type;
     52    typedef unweighted_iterator_tag type;
    5753  };
    5854
     
    6460  template <class T1, class T2>
    6561  struct unweighted_type_and {
    66     typedef weighted_type type;
     62    typedef weighted_iterator_tag type;
    6763  };
    6864
     
    7268   */
    7369  template <>
    74   struct unweighted_type_and<unweighted_type, unweighted_type> {
    75     typedef unweighted_type type;
     70  struct unweighted_type_and<unweighted_iterator_tag, unweighted_iterator_tag> {
     71    typedef unweighted_iterator_tag type;
    7672  };
    7773
     
    9995
    10096  /// check (at compile time) that iterator is unweighted.
    101   inline void check_iterator_is_unweighted(unweighted_type x){}
     97  inline void check_iterator_is_unweighted(unweighted_iterator_tag x){}
    10298
    10399  /**
Note: See TracChangeset for help on using the changeset viewer.