Changeset 909 for trunk/yat/statistics


Ignore:
Timestamp:
Sep 29, 2007, 1:49:05 AM (14 years ago)
Author:
Peter
Message:

using weighted_iterator_traits, closes #151

Location:
trunk/yat/statistics
Files:
3 edited

Legend:

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

    r900 r909  
    77#include "AveragerPairWeighted.h"
    88#include "vector_distance.h"
     9#include "yat/utility/IteratorTraits.h"
    910
    1011#include <cmath>
     
    3435  double vector_distance(Iter1 beg1,Iter1 end1, Iter2 beg2,
    3536                         const euclidean_vector_distance_tag& disttype,
    36                          std::forward_iterator_tag)
     37                         utility::unweighted_type)
    3738  {
    3839    AveragerPair ap;
     
    5051  double vector_distance(Iter1 beg1, Iter1 end1, Iter2 beg2,
    5152                         const euclidean_vector_distance_tag& disttype,
    52                          utility::weighted_random_access_iterator_tag)
     53                         utility::weighted_type)
    5354  {
    5455    AveragerPairWeighted ap;
  • trunk/yat/statistics/pearson_vector_distance.h

    r900 r909  
    88#include "AveragerPair.h"
    99#include "AveragerPairWeighted.h"
     10#include "yat/utility/IteratorTraits.h"
    1011
    1112namespace theplu {
     
    3334  double vector_distance(Iter beg1,Iter end1, Iter beg2,
    3435                         const pearson_vector_distance_tag& disttype,
    35                          std::forward_iterator_tag)
     36                         utility::unweighted_type)
    3637  {
    3738    AveragerPair ap;
     
    4849  double vector_distance(Iter beg1,Iter end1, Iter beg2,
    4950                         const pearson_vector_distance_tag& disttype,
    50                          utility::weighted_random_access_iterator_tag)
     51                         utility::weighted_type)
    5152  {
    5253    AveragerPairWeighted ap;
  • trunk/yat/statistics/vector_distance.h

    r898 r909  
    88#include "yat/classifier/DataLookup1D.h"
    99#include "yat/classifier/DataLookupWeighted1D.h"
     10#include "yat/utility/IteratorTraits.h"
    1011
    1112namespace theplu {
     
    5152  double vector_distance(Iter1 beg1, Iter1 end1, Iter2 beg2, const Dist disttag)
    5253  {
    53     return vector_distance(beg1,end1,beg2,
    54                            typename vector_distance_traits<Dist>::distance(),
    55                            typename std::iterator_traits<Iter1>::iterator_category());
     54    return
     55      vector_distance(beg1,end1,beg2,
     56                      typename vector_distance_traits<Dist>::distance(),
     57                      typename utility::weighted_iterator_traits<Iter1>::type());
    5658  }       
    5759
Note: See TracChangeset for help on using the changeset viewer.