Changeset 1445 for trunk/test/normalization_test.cc
- Timestamp:
- Aug 28, 2008, 12:53:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/normalization_test.cc
r1432 r1445 25 25 26 26 #include "yat/normalization/QuantileNormalizer.h" 27 #include "yat/normalization/Centralizer.h" 27 28 28 29 #include "yat/utility/Matrix.h" 29 30 31 #include <vector> 32 30 33 using namespace theplu::yat; 34 void test_centralizer(test::Suite&); 31 35 void test_quantile_normalize(test::Suite&); 32 36 … … 36 40 suite.err() << "testing normalizations ... " << std::endl; 37 41 42 test_centralizer(suite); 38 43 test_quantile_normalize(suite); 39 44 … … 42 47 43 48 49 void test_centralizer(test::Suite& suite) 50 { 51 suite.err() << "Testing Centralizer\n"; 52 std::vector<double> vec; 53 vec.push_back(1); 54 vec.push_back(2); 55 vec.push_back(3); 56 normalization::Centralizer<> c; 57 c(vec.begin(), vec.end(), vec.begin()); 58 for (size_t i=0; i<vec.size(); ++i) 59 suite.add(suite.equal(vec[i], static_cast<double>(i)-1.0)); 60 } 61 62 44 63 void test_quantile_normalize(test::Suite& suite) 45 64 { 46 suite.err() << "Testing quantile normalization\n";65 suite.err() << "Testing QuantileNormalizer\n"; 47 66 48 67 utility::Matrix m(2,2);
Note: See TracChangeset
for help on using the changeset viewer.