Ignore:
Timestamp:
Feb 14, 2008, 5:26:31 PM (15 years ago)
Author:
Peter
Message:

fixes #267 iterator for MatrixLookupWeighted?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/MatrixLookupWeighted.cc

    r1035 r1091  
    244244
    245245
     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
    246266  double MatrixLookupWeighted::data(size_t row, size_t column) const
    247267  {
     
    249269  }
    250270
     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  }
    251292
    252293
Note: See TracChangeset for help on using the changeset viewer.