Ignore:
Timestamp:
Feb 10, 2008, 11:48:19 PM (14 years ago)
Author:
Peter
Message:

Iterators for KernelLookup? - refs #267

File:
1 edited

Legend:

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

    r1000 r1066  
    117117
    118118
     119  KernelLookup::const_iterator KernelLookup::begin(void) const
     120  {
     121    return const_iterator(const_iterator::iterator_type(*this, 0, 0), 1);
     122  }
     123
     124
     125  KernelLookup::const_iterator KernelLookup::begin_column(size_t i) const
     126  {
     127    return const_iterator(const_iterator::iterator_type(*this, 0, i), columns());
     128  }
     129
     130
     131  KernelLookup::const_iterator KernelLookup::begin_row(size_t i) const
     132  {
     133    return const_iterator(const_iterator::iterator_type(*this, i, 0), 1);
     134  }
     135
     136
    119137  const DataLookup2D* KernelLookup::data(void) const
    120138  {
     
    132150  {
    133151    return kernel_->element(vec, row_index_[i]);
     152  }
     153
     154
     155  KernelLookup::const_iterator KernelLookup::end(void) const
     156  {
     157    return const_iterator(const_iterator::iterator_type(*this, rows(), 0), 1);
     158  }
     159
     160
     161  KernelLookup::const_iterator KernelLookup::end_column(size_t i) const
     162  {
     163    return const_iterator(const_iterator::iterator_type(*this, this->rows(), i),
     164                          this->columns());
     165  }
     166
     167
     168  KernelLookup::const_iterator KernelLookup::end_row(size_t i) const
     169  {
     170    return const_iterator(const_iterator::iterator_type(*this, i+1, 0), 1);
    134171  }
    135172
Note: See TracChangeset for help on using the changeset viewer.