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.h

    r1000 r1066  
    77  Copyright (C) 2005 Jari Häkkinen, Peter Johansson
    88  Copyright (C) 2006 Jari Häkkinen, Markus Ringnér, Peter Johansson
    9   Copyright (C) 2007 Peter Johansson
     9  Copyright (C) 2007, 2008 Peter Johansson
    1010
    1111  This file is part of the yat library, http://trac.thep.lu.se/yat
     
    3030#include "DataLookup2D.h"
    3131#include "MatrixLookup.h"
     32#include "yat/utility/Iterator.h"
     33#include "yat/utility/StrideIterator.h"
     34
    3235
    3336#include <vector>
     
    6669
    6770  public:
     71    /// 'Read Only' iterator
     72    typedef utility::StrideIterator<utility::Iterator<const KernelLookup,
     73                                                      const double> >
     74    const_iterator;
    6875
    6976    ///
     
    158165    virtual ~KernelLookup(void);
    159166
     167    /**
     168       Iterator iterates along a row. When end of row is reached it
     169       jumps to beginning of next row.
     170
     171       \return const_iterator pointing to upper-left element.
     172     */
     173    const_iterator begin(void) const;
     174
     175    /**
     176       Iterator iterates along a column.
     177
     178       \return iterator pointing to first element of column \a i.
     179     */
     180    const_iterator begin_column(size_t) const;
     181
     182    /**
     183       Iterator iterates along a column.
     184
     185       \return const_iterator pointing to first element of column \a i.
     186     */
     187    const_iterator begin_row(size_t) const;
     188
    160189    ///
    161190    /// Each column in returned DataLookup corresponds to the column
     
    187216    */
    188217    double element(const DataLookupWeighted1D& vec, size_t i) const;
     218
     219    /**
     220       \return const_iterator pointing to end of matrix
     221     */
     222    const_iterator end(void) const;
     223
     224    /**
     225       \return const_iterator pointing to end of column \a i
     226     */
     227    const_iterator end_column(size_t) const;
     228
     229    /**
     230       \return const_iterator pointing to end of row \a i
     231     */
     232    const_iterator end_row(size_t) const;
    189233
    190234    /**
Note: See TracChangeset for help on using the changeset viewer.