Changeset 1774 for trunk/test/normalization_test.cc
- Timestamp:
- Feb 5, 2009, 4:48:18 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/normalization_test.cc
r1773 r1774 178 178 // test with unweighted target and source 179 179 std::vector<double> target; 180 target.reserve(1000); 180 181 while (target.size()<1000) 181 182 target.push_back(target.size()); … … 184 185 while (source.size()<10) 185 186 source.push_back(source.size()*10); 186 qQN(source.begin(), source.end(), source.begin()); 187 187 std::vector<double> result(source.size()); 188 189 qQN(source.begin(), source.end(), result.begin()); 190 191 using utility::DataWeight; 188 192 // test with unweighted target and weighted source 189 std::vector<utility::DataWeight> src_w(source.size() );193 std::vector<utility::DataWeight> src_w(source.size(), DataWeight(0, 1)); 190 194 std::copy(source.begin(), source.end(), 191 195 utility::data_iterator(src_w.begin())); 192 std::fill(utility::weight_iterator(src_w.begin()), 193 utility::weight_iterator(src_w.end()), 1.0); 194 195 qQN(src_w.begin(), src_w.end(), src_w.begin()); 196 197 std::vector<utility::DataWeight> result_w(src_w.size()); 198 qQN(src_w.begin(), src_w.end(), result_w.begin()); 196 199 // FIXME: this test fails 197 suite.xadd(suite.equal_range( source.begin(), source.end(),198 utility::data_iterator( src_w.begin())));200 suite.xadd(suite.equal_range(result.begin(), result.end(), 201 utility::data_iterator(result_w.begin()))); 199 202 } 200 203
Note: See TracChangeset
for help on using the changeset viewer.