Changeset 1040


Ignore:
Timestamp:
Feb 6, 2008, 1:42:53 AM (13 years ago)
Author:
Peter
Message:

working on #267

Location:
trunk/yat
Files:
1 added
3 edited

Legend:

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

    r1018 r1040  
    2727*/
    2828
     29#include "yat/utility/Functor.h"
    2930#include "yat/utility/Iterator.h"
    3031
     
    4950 
    5051  public:
    51 
    5252    /// 'Read Only' iterator
    53     typedef utility::Iterator<const double, const classifier::DataLookup1D>
     53    typedef utility::Iterator<const utility::ContIdentity<const double,
     54                                                          const DataLookup1D> >
    5455    const_iterator;
    5556
  • trunk/yat/utility/Iterator.h

    r1037 r1040  
    4141     @brief Iterator
    4242  */
    43   template<typename T, typename Container>
     43  template<typename T>
    4444  class Iterator
    4545  {
     
    4949    typedef size_t difference_type;
    5050    typedef double* pointer;
    51     typedef T reference;
     51    typedef typename T::result_type reference;
     52    typedef typename T::container_type Container ;
    5253
    5354  private:
    54     typedef Iterator<reference, Container> self;
     55    typedef Iterator<T> self;
    5556
    5657  public:
     
    6869    Iterator(Container& container, difference_type index)
    6970      : container_(&container), index_(index) {}
    70 
    71     operator Iterator<const reference, const Container>()
    72     { return Iterator<const reference, const Container>(*container_, index_); }
    7371
    7472    /**
  • trunk/yat/utility/Makefile.am

    r1038 r1040  
    3636include_utility_HEADERS = \
    3737  Alignment.h ColumnStream.h CommandLine.h \
    38   Exception.h FileUtil.h Iterator.h iterator_traits.h \
     38  Exception.h FileUtil.h Functor.h Iterator.h iterator_traits.h \
    3939  IteratorWeighted.h kNNI.h matrix.h NNI.h \
    4040  Option.h OptionArg.h OptionFile.h OptionInFile.h OptionOutFile.h \
Note: See TracChangeset for help on using the changeset viewer.