Ignore:
Timestamp:
Sep 26, 2007, 3:44:19 PM (15 years ago)
Author:
Markus Ringnér
Message:

A first suggestion for how to adress #250. Also removed contamination of namespace std (see #251).

File:
1 edited

Legend:

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

    r897 r898  
    66#include <iterator>
    77
     8#include "yat/classifier/DataLookup1D.h"
     9#include "yat/classifier/DataLookupWeighted1D.h"
     10
    811namespace theplu {
    912namespace yat {
    1013
    1114namespace statistics {
    12 
     15 
    1316  ///
    1417  /// For each measure to calculate distances between containers
     
    5255                           typename std::iterator_traits<Iter1>::iterator_category());
    5356  }       
     57
     58  /// A partial specialization for DataLookupWeighted1D
     59  template<typename Dist>
     60  double vector_distance(const classifier::DataLookupWeighted1D::const_iterator& beg1,const classifier::DataLookupWeighted1D::const_iterator& end1,const classifier::DataLookupWeighted1D::const_iterator& beg2)
     61  {
     62    return vector_distance(beg1,end1,beg2, typename statistics::vector_distance_traits<Dist>::distance());
     63  }
    5464 
    55   // Temporary function of where I end up when calling with a reference to distance_tag
    56   template <typename Iter1, typename Iter2>
    57   double vector_distance(Iter1 beg1, Iter1 end1, Iter2 beg2,
    58                          const vector_distance_tag& disttag)
     65  /// A partial specialization for DataLookup1D
     66  template<typename Dist>
     67  double vector_distance(const classifier::DataLookup1D::const_iterator& beg1,const classifier::DataLookup1D::const_iterator& end1,const classifier::DataLookup1D::const_iterator& beg2)
    5968  {
    60     return 0;
    61   }       
     69    return vector_distance(beg1,end1,beg2, typename statistics::vector_distance_traits<Dist>::distance());
     70  }
    6271
    6372 
Note: See TracChangeset for help on using the changeset viewer.