Changeset 1520 for trunk/test/normalization_test.cc
- Timestamp:
- Sep 21, 2008, 6:53:12 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/normalization_test.cc
r1512 r1520 26 26 #include "yat/utility/DataIterator.h" 27 27 #include "yat/normalizer/QuantileNormalizer.h" 28 #include "yat/normalizer/RowNormalizer.h" 28 29 #include "yat/normalizer/Spearman.h" 29 30 … … 40 41 void test_column_normalize(test::Suite&); 41 42 void test_quantile_normalize(test::Suite&); 43 void test_row_normalize(test::Suite&); 42 44 void test_spearman(test::Suite&); 43 45 void test_spearman_weighted(test::Suite&); … … 51 53 test_column_normalize(suite); 52 54 test_quantile_normalize(suite); 55 test_row_normalize(suite); 53 56 test_spearman(suite); 54 57 … … 112 115 suite.err() << "Testing m(1,1)\n"; 113 116 suite.add(suite.equal(m(1,1), 2)); 117 } 118 119 void test_row_normalize(test::Suite& suite) 120 { 121 using namespace normalizer; 122 suite.err() << "Testing RowNormalizer\n"; 123 124 utility::Matrix m(2,3); 125 m(0,0) = 0; 126 m(0,1) = 10; 127 m(1,0) = 2; 128 m(1,1) = 4; 129 utility::Matrix m2(m); 130 m2.transpose(); 131 ColumnNormalizer<Centralizer<> > cn; 132 RowNormalizer<Centralizer<> > rn; 133 cn(m, m); 134 rn(m2, m2); 135 m2.transpose(); 136 suite.equal_range(m.begin(), m.end(), m2.begin()); 114 137 } 115 138
Note: See TracChangeset
for help on using the changeset viewer.