Ignore:
Timestamp:
Sep 24, 2008, 5:46:28 PM (14 years ago)
Author:
Peter
Message:

refs #444 - started using boost::permutation_iterator for vector iterators from MatrixLookup? and also removed stride layer for const_iterator (stride was always 1).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/MatrixLookup.h

    r1487 r1528  
    2929#include "yat/utility/Index.h"
    3030#include "yat/utility/iterator_traits.h"
     31#include "yat/utility/Matrix.h"
    3132#include "yat/utility/SmartPtr.h"
    32 #include "yat/utility/StrideIterator.h"
     33
     34#include <boost/iterator/permutation_iterator.hpp>
    3335
    3436#include <iostream>
     
    3739namespace theplu {
    3840namespace yat {
    39 
    40 namespace utility {
    41   class Matrix;
    42 }
    43 
    4441namespace classifier { 
    4542
     
    7673  public:
    7774    /// 'Read Only' iterator
    78     typedef utility::StrideIterator<
    79     utility::Container2DIterator<const MatrixLookup, const double, void,
    80                                  const double> >
     75    typedef utility::Container2DIterator<const MatrixLookup, const double,
     76                                         void, const double>
    8177    const_iterator;
    8278
     
    8480       'Read only' iterator used to iterate over a column
    8581     */
    86     typedef const_iterator const_column_iterator;
     82    typedef boost::permutation_iterator<utility::Matrix::const_column_iterator,
     83                                        utility::Index::const_iterator>
     84    const_column_iterator;
    8785
    8886    /**
    8987       'Read only' iterator used to iterate over a row
    9088     */
    91     typedef const_iterator const_row_iterator;
     89    typedef const_column_iterator const_row_iterator;
    9290
    9391    ///
Note: See TracChangeset for help on using the changeset viewer.