Changeset 898 for trunk/test/iterator_test.cc
- Timestamp:
- Sep 26, 2007, 3:44:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/iterator_test.cc
r883 r898 24 24 #include "yat/classifier/DataLookup1D.h" 25 25 26 #include "yat/classifier/DataLookupWeighted1D.h" 27 #include "yat/classifier/MatrixLookupWeighted.h" 26 28 #include "yat/utility/Iterator.h" 29 #include "yat/utility/IteratorWeighted.h" 30 #include "yat/utility/matrix.h" 27 31 #include "yat/utility/vector.h" 28 32 … … 63 67 std::sort(begin, end); 64 68 69 // test std algorithm on IteratorWeighted 70 utility::matrix m(1,3,1); 71 m(0,1)=2.0; 72 utility::matrix w(1,3,1); 73 classifier::MatrixLookupWeighted mw(m,w); 74 classifier::DataLookupWeighted1D aw(mw,0,true); 75 size_t nof1=std::count(aw.begin(),aw.end(),1.0); 76 if(nof1!=2) { 77 *message << "std algoritm with IteratorWeighted failed" << std::endl; 78 ok=false; 79 } 80 65 81 if (!ok) 66 82 *message << "iterator test failed" << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.