Ignore:
Timestamp:
Oct 3, 2007, 8:11:31 AM (15 years ago)
Author:
Markus Ringnér
Message:

Fixing minor mistakes so things gets installed with make install

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/vector_distance_test.cc

    r901 r926  
    55#include "yat/statistics/euclidean_vector_distance.h"
    66#include "yat/statistics/pearson_vector_distance.h"
    7 #include "yat/statistics/vector_distance_ptr.h"
    87#include "yat/utility/matrix.h"
    98#include "yat/utility/vector.h"
     
    1716
    1817using namespace theplu::yat;
    19 
    20 
    21 // Function to test pointers to distance specialized for DataLookup1D::iterator
    22 double f(statistics::vector_distance_lookup_weighted_ptr distance) {
    23   utility::matrix m(2,3,1);
    24   m(0,1)=2;
    25   m(1,0)=0;
    26   m(1,1)=0;
    27   utility::matrix w(2,3,1);
    28   w(0,0)=0;
    29   classifier::MatrixLookupWeighted mw(m,w);
    30   classifier::DataLookupWeighted1D aw(mw,0,true);
    31   classifier::DataLookupWeighted1D bw(mw,1,true);
    32  
    33   double dist=(*distance)(aw.begin(),aw.end(),bw.begin());
    34   return dist; 
    35 }
    3618
    3719int main(const int argc,const char* argv[])
     
    9880  }
    9981 
    100  
    101   // Test with pointer to a vector_distance
    102   statistics::vector_distance_lookup_weighted_ptr test_ptr=
    103     statistics::vector_distance<statistics::euclidean_vector_distance_tag>;
    104   dist=(*test_ptr)(aw.begin(),aw.end(),bw.begin());
    105   if(fabs(dist-2)>tolerance) {
    106     *error << "Error when using pointer to vector_distance" << std::endl;
    107     ok=false;
    108   }
    109  
     82   
    11083  // Test with std::vectors
    11184  std::vector<double> sa(3,1);
Note: See TracChangeset for help on using the changeset viewer.