Changeset 1496
- Timestamp:
- Sep 12, 2008, 5:44:31 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/normalization_test.cc
r1487 r1496 25 25 #include "yat/normalization/ColumnNormalizer.h" 26 26 #include "yat/normalization/QuantileNormalizer.h" 27 #include "yat/normalization/Spearman.h" 27 28 28 29 #include "yat/utility/Matrix.h" … … 34 35 void test_column_normalize(test::Suite&); 35 36 void test_quantile_normalize(test::Suite&); 37 void test_spearman(test::Suite&); 36 38 37 39 int main(int argc, char* argv[]) … … 43 45 test_column_normalize(suite); 44 46 test_quantile_normalize(suite); 47 test_spearman(suite); 45 48 46 49 return suite.return_value(); … … 105 108 } 106 109 110 void test_spearman(test::Suite& suite) 111 { 112 suite.err() << "Testing Spearman\n"; 113 normalization::Spearman spearman; 114 std::vector<double> vec; 115 vec.push_back(0); 116 vec.push_back(2); 117 vec.push_back(3); 118 vec.push_back(1); 119 spearman(vec.begin(), vec.end(), vec.begin()); 120 std::vector<double> correct; 121 correct.push_back(0); 122 correct.push_back(0.5); 123 correct.push_back(0.75); 124 correct.push_back(0.25); 125 suite.equal_range(vec.begin(), vec.end(), correct.begin()); 126 } -
trunk/yat/normalization/Makefile.am
r1493 r1496 26 26 27 27 include_normalization_HEADERS = Centralizer.h ColumnNormalizer.h \ 28 QuantileNormalizer.h 28 QuantileNormalizer.h Spearman.h
Note: See TracChangeset
for help on using the changeset viewer.