Changeset 1063
- Timestamp:
- Feb 10, 2008, 10:33:39 PM (16 years ago)
- Location:
- trunk/yat/classifier
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/MatrixLookup.cc
r1000 r1063 161 161 162 162 163 MatrixLookup::const_iterator MatrixLookup::begin(void) const 164 { 165 return const_iterator(normal_iter(*this, 0, 0), 1); 166 } 167 168 169 MatrixLookup::const_iterator MatrixLookup::begin_column(size_t i) const 170 { 171 return const_iterator(normal_iter(*this, 0, i),this->columns()); 172 } 173 174 175 MatrixLookup::const_iterator MatrixLookup::begin_row(size_t i) const 176 { 177 return const_iterator(normal_iter(*this, i, 0), 1); 178 } 179 180 181 MatrixLookup::const_iterator MatrixLookup::end(void) const 182 { 183 return const_iterator(normal_iter(*this, this->rows(), 0), 1); 184 } 185 186 187 MatrixLookup::const_iterator MatrixLookup::end_column(size_t i) const 188 { 189 return const_iterator(normal_iter(*this, this->rows(), i), this->columns()); 190 } 191 192 193 MatrixLookup::const_iterator MatrixLookup::end_row(size_t i) const 194 { 195 return const_iterator(normal_iter(*this, i+1, 0), 1); 196 } 197 198 163 199 const MatrixLookup* 164 200 MatrixLookup::selected(const std::vector<size_t>& i) const -
trunk/yat/classifier/MatrixLookup.h
r1062 r1063 29 29 #include "DataLookup2D.h" 30 30 #include "yat/utility/Iterator.h" 31 #include "yat/utility/StrideIterator.h" 31 32 32 33 #include <iostream> … … 70 71 class MatrixLookup : public DataLookup2D 71 72 { 72 typedef utility::Iterator<const MatrixLookup, const double&> const_iterator; 73 74 public: 73 public: 74 /// 'Read Only' iterator 75 typedef utility::StrideIterator<utility::Iterator<const MatrixLookup, 76 const double> > 77 const_iterator; 78 75 79 /// 76 80 /// Constructor creating a lookup into the entire @a matrix. … … 219 223 */ 220 224 const_iterator begin(void) const; 225 226 /** 227 */ 228 const_iterator begin_column(size_t) const; 229 230 /** 231 */ 221 232 const_iterator begin_row(size_t) const; 222 const_iterator begin_column(size_t) const; 233 234 /** 235 */ 236 const_iterator end(void) const; 237 238 /** 239 */ 240 const_iterator end_column(size_t) const; 241 242 /** 243 */ 244 const_iterator end_row(size_t) const; 223 245 224 246 /** … … 288 310 289 311 private: 312 typedef utility::Iterator<const MatrixLookup, const double> normal_iter; 290 313 friend class MatrixLookupWeighted; 291 314
Note: See TracChangeset
for help on using the changeset viewer.