Changeset 1146
- Timestamp:
- Feb 25, 2008, 10:03:48 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/iterator_test.cc
r1138 r1146 94 94 ok = false; 95 95 96 classifier::MatrixLookup ml(m); 97 classifier::DataLookup1D dl1(ml,0,true); 98 if (dl1.begin()!=ml.begin_row(0)) 99 ok = false; 100 if (dl1.end()!=ml.end_row(0)) 101 ok = false; 102 classifier::DataLookup1D dl2(ml,0,false); 103 if (dl2.begin()!=ml.begin_column(0)) 104 ok = false; 105 if (dl2.end()!=ml.end_column(0)) 106 ok = false; 107 96 108 if (!ok) 97 109 *message << "iterator test failed" << std::endl; -
trunk/yat/classifier/DataLookup1D.cc
r1121 r1146 25 25 26 26 #include "DataLookup1D.h" 27 #include "DataLookup2D.h"28 27 #include "MatrixLookup.h" 29 28 … … 39 38 namespace classifier { 40 39 41 DataLookup1D::DataLookup1D(const DataLookup2D& m, const size_t i,40 DataLookup1D::DataLookup1D(const MatrixLookup& m, const size_t i, 42 41 const bool row_vector) 43 42 : column_vector_(!row_vector), index_(i), matrix_(&m), owner_(false) -
trunk/yat/classifier/DataLookup1D.h
r1110 r1146 27 27 */ 28 28 29 #include " DataLookup2D.h"29 #include "MatrixLookup.h" 30 30 #include "yat/utility/Container2DIterator.h" 31 31 #include "yat/utility/iterator_traits.h" … … 51 51 /// 'Read Only' iterator 52 52 typedef utility::StrideIterator< 53 utility::Container2DIterator<const DataLookup2D, const double, void,53 utility::Container2DIterator<const MatrixLookup, const double, void, 54 54 const double> > 55 55 const_iterator; … … 62 62 /// column. @param index which row/column to look into. 63 63 /// 64 DataLookup1D(const DataLookup2D&, const size_t index,64 DataLookup1D(const MatrixLookup&, const size_t index, 65 65 const bool row_vector); 66 66 … … 135 135 const bool column_vector_; 136 136 const size_t index_; 137 const DataLookup2D* matrix_;137 const MatrixLookup* matrix_; 138 138 const bool owner_; 139 139 -
trunk/yat/classifier/Kernel.cc
r1134 r1146 104 104 return kf_->operator()(vec, DataLookupWeighted1D(*data_w_,i, false)); 105 105 else 106 return kf_->operator()(vec, DataLookup1D(*data_,i, false)); 106 return kf_->operator()(vec,DataLookup1D(dynamic_cast<const MatrixLookup&> 107 (*data_),i, false)); 107 108 } 108 109 … … 113 114 return kf_->operator()(vec, DataLookupWeighted1D(*data_w_,i, false)); 114 115 else 115 return kf_->operator()(vec, DataLookup1D(*data_,i, false)); 116 return kf_->operator()(vec, DataLookup1D(dynamic_cast<const MatrixLookup&> 117 (*data_),i, false)); 116 118 } 117 119 -
trunk/yat/classifier/Kernel_MEV.cc
r1000 r1146 72 72 DataLookupWeighted1D(*data_w_,column,false)); 73 73 else 74 return (*kf_)(DataLookup1D(*data_,row,false), 75 DataLookup1D(*data_,column,false)); 74 return (*kf_)(DataLookup1D(dynamic_cast<const MatrixLookup&> 75 (*data_),row,false), 76 DataLookup1D(dynamic_cast<const MatrixLookup&> 77 (*data_),column,false)); 76 78 } 77 79 -
trunk/yat/classifier/Kernel_SEV.cc
r1121 r1146 70 70 for (size_t j=i; j<kernel_matrix_.columns(); j++) 71 71 kernel_matrix_(i,j) = kernel_matrix_(j,i) = 72 (*kf_)(DataLookup1D(*data_,i,false),DataLookup1D(*data_,j,false)); 72 (*kf_)(DataLookup1D(dynamic_cast<const MatrixLookup&>(*data_),i,false), 73 DataLookup1D(dynamic_cast<const MatrixLookup&>(*data_),j,false)); 73 74 } 74 75
Note: See TracChangeset
for help on using the changeset viewer.