Changeset 926
 Timestamp:
 Oct 3, 2007, 8:11:31 AM (15 years ago)
 Location:
 trunk
 Files:

 1 deleted
 3 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/vector_distance_test.cc
r901 r926 5 5 #include "yat/statistics/euclidean_vector_distance.h" 6 6 #include "yat/statistics/pearson_vector_distance.h" 7 #include "yat/statistics/vector_distance_ptr.h"8 7 #include "yat/utility/matrix.h" 9 8 #include "yat/utility/vector.h" … … 17 16 18 17 using namespace theplu::yat; 19 20 21 // Function to test pointers to distance specialized for DataLookup1D::iterator22 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 }36 18 37 19 int main(const int argc,const char* argv[]) … … 98 80 } 99 81 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(dist2)>tolerance) { 106 *error << "Error when using pointer to vector_distance" << std::endl; 107 ok=false; 108 } 109 82 110 83 // Test with std::vectors 111 84 std::vector<double> sa(3,1); 
trunk/yat/classifier/Makefile.am
r925 r926 82 82 MatrixLookupWeighted.h \ 83 83 NBC.h \ 84 NCC.h \ 84 85 PolynomialKernelFunction.h \ 85 86 SVM.h \ 
trunk/yat/statistics/Makefile.am
r865 r926 27 27 28 28 noinst_LTLIBRARIES = libstatistics.la 29 libstatistics_la_SOURCES = AUC.cc Averager.cc AveragerPair.cc 30 AveragerWeighted.cc AveragerPairWeighted.cc Distance.cc 31 Euclidean.cc Fisher.cc FoldChange.cc Histogram.cc Pearson.cc 29 libstatistics_la_SOURCES = AUC.cc Averager.cc AveragerPair.cc \ 30 AveragerWeighted.cc AveragerPairWeighted.cc Distance.cc \ 31 Euclidean.cc Fisher.cc FoldChange.cc Histogram.cc Pearson.cc \ 32 32 PearsonCorrelation.cc PearsonDistance.cc ROC.cc \ 33 SAMScore.cc Score.cc SNRScore.cc tScore.cc 33 SAMScore.cc Score.cc SNRScore.cc tScore.cc tTest.cc \ 34 34 utility.cc VectorFunction.cc WilcoxonFoldChange.cc 35 35 36 36 include_statisticsdir = $(includedir)/yat/statistics 37 37 38 include_statistics_HEADERS = AUC.h Averager.h AveragerPair.h 38 include_statistics_HEADERS = AUC.h Averager.h AveragerPair.h \ 39 39 AveragerWeighted.h AveragerPairWeighted.h Distance.h Euclidean.h \ 40 Fisher.h\40 euclidean_vector_distance.h Fisher.h \ 41 41 FoldChange.h Histogram.h Pearson.h PearsonCorrelation.h \ 42 PearsonDistance.h ROC.h \42 PearsonDistance.h pearson_vector_distance.h ROC.h \ 43 43 SAMScore.h Score.h SNRScore.h tScore.h tTest.h \ 44 utility.h VectorFunction.h WilcoxonFoldChange.h44 utility.h vector_distance.h VectorFunction.h WilcoxonFoldChange.h
Note: See TracChangeset
for help on using the changeset viewer.