Changeset 1091
- Timestamp:
- Feb 14, 2008, 5:26:31 PM (16 years ago)
- Location:
- trunk/yat/classifier
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/MatrixLookupWeighted.cc
r1035 r1091 244 244 245 245 246 MatrixLookupWeighted::const_iterator MatrixLookupWeighted::begin(void) const 247 { 248 return const_iterator(const_iterator::iterator_type(*this, 0, 0), 1); 249 } 250 251 252 MatrixLookupWeighted::const_iterator 253 MatrixLookupWeighted::begin_column(size_t i) const 254 { 255 return const_iterator(const_iterator::iterator_type(*this, 0, i),columns()); 256 } 257 258 259 MatrixLookupWeighted::const_iterator 260 MatrixLookupWeighted::begin_row(size_t i) const 261 { 262 return const_iterator(const_iterator::iterator_type(*this, i, 0), 1); 263 } 264 265 246 266 double MatrixLookupWeighted::data(size_t row, size_t column) const 247 267 { … … 249 269 } 250 270 271 272 273 MatrixLookupWeighted::const_iterator MatrixLookupWeighted::end(void) const 274 { 275 return const_iterator(const_iterator::iterator_type(*this, rows(), 0), 1); 276 } 277 278 279 MatrixLookupWeighted::const_iterator 280 MatrixLookupWeighted::end_column(size_t i) const 281 { 282 return const_iterator(const_iterator::iterator_type(*this, rows(), i), 283 columns()); 284 } 285 286 287 MatrixLookupWeighted::const_iterator 288 MatrixLookupWeighted::end_row(size_t i) const 289 { 290 return const_iterator(const_iterator::iterator_type(*this, i+1, 0), 1); 291 } 251 292 252 293 -
trunk/yat/classifier/MatrixLookupWeighted.h
r1090 r1091 251 251 virtual ~MatrixLookupWeighted(); 252 252 253 /** 254 Iterator iterates along a row. When end of row is reached it 255 jumps to beginning of next row. 256 257 \return const_iterator pointing to upper-left element. 258 */ 259 const_iterator begin(void) const; 260 261 /** 262 Iterator iterates along a column. 263 264 \return iterator pointing to first element of column \a i. 265 */ 266 const_iterator begin_column(size_t) const; 267 268 /** 269 Iterator iterates along a column. 270 271 \return const_iterator pointing to first element of column \a i. 272 */ 273 const_iterator begin_row(size_t) const; 274 253 275 /// 254 276 /// @return data value of element (@a row, @a column) 255 277 /// 256 278 double data(size_t row, size_t column) const; 279 280 /** 281 \return const_iterator pointing to end of matrix 282 */ 283 const_iterator end(void) const; 284 285 /** 286 \return const_iterator pointing to end of column \a i 287 */ 288 const_iterator end_column(size_t) const; 289 290 /** 291 \return const_iterator pointing to end of row \a i 292 */ 293 const_iterator end_row(size_t) const; 257 294 258 295 /**
Note: See TracChangeset
for help on using the changeset viewer.