Changeset 1361
- Timestamp:
- Jul 2, 2008, 11:23:56 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/matrix_lookup_test.cc
r1360 r1361 55 55 suite.err() << "Ok" << std::endl; 56 56 57 // FIXME - see ticket:389 58 //suite.add(suite.test_stream(m1)); 57 suite.add(suite.test_stream(m1)); 59 58 60 59 … … 162 161 suite.err() << "MatrixLookup::validation_data(const std::vector<size_t>,\n" 163 162 << " const std::vector<size_t>)..."; 164 std::vector<size_t> val(23, 2);163 std::vector<size_t> val(23,1); 165 164 const classifier::MatrixLookup* ValData = 166 165 new MatrixLookup(m2, utility::Index(val), false); -
trunk/yat/classifier/MatrixLookup.cc
r1275 r1361 113 113 : data_(other.data_) 114 114 { 115 assert(other.validate()); 115 116 if (row){ 116 117 row_index_ = utility::Index(other.row_index_, index); … … 123 124 assert(validate()); 124 125 } 125 126 126 127 127 -
trunk/yat/utility/Index.cc
r1134 r1361 23 23 24 24 #include "Index.h" 25 26 #include <cassert> 25 27 26 28 namespace theplu { … … 57 59 std::vector<size_t>* vec = new std::vector<size_t>; 58 60 vec->reserve(b.size()); 59 for (size_t i=0; i<b.size(); ++i) 61 for (size_t i=0; i<b.size(); ++i) { 62 assert(b[i]<a.size()); 60 63 vec->push_back(a[b[i]]); 64 } 61 65 index_ = SmartPtr<const std::vector<size_t> >(vec); 62 66 }
Note: See TracChangeset
for help on using the changeset viewer.