Changeset 1040
- Timestamp:
- Feb 6, 2008, 1:42:53 AM (15 years ago)
- Location:
- trunk/yat
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/classifier/DataLookup1D.h
r1018 r1040 27 27 */ 28 28 29 #include "yat/utility/Functor.h" 29 30 #include "yat/utility/Iterator.h" 30 31 … … 49 50 50 51 public: 51 52 52 /// 'Read Only' iterator 53 typedef utility::Iterator<const double, const classifier::DataLookup1D> 53 typedef utility::Iterator<const utility::ContIdentity<const double, 54 const DataLookup1D> > 54 55 const_iterator; 55 56 -
trunk/yat/utility/Iterator.h
r1037 r1040 41 41 @brief Iterator 42 42 */ 43 template<typename T , typename Container>43 template<typename T> 44 44 class Iterator 45 45 { … … 49 49 typedef size_t difference_type; 50 50 typedef double* pointer; 51 typedef T reference; 51 typedef typename T::result_type reference; 52 typedef typename T::container_type Container ; 52 53 53 54 private: 54 typedef Iterator< reference, Container> self;55 typedef Iterator<T> self; 55 56 56 57 public: … … 68 69 Iterator(Container& container, difference_type index) 69 70 : container_(&container), index_(index) {} 70 71 operator Iterator<const reference, const Container>()72 { return Iterator<const reference, const Container>(*container_, index_); }73 71 74 72 /** -
trunk/yat/utility/Makefile.am
r1038 r1040 36 36 include_utility_HEADERS = \ 37 37 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 \ 39 39 IteratorWeighted.h kNNI.h matrix.h NNI.h \ 40 40 Option.h OptionArg.h OptionFile.h OptionInFile.h OptionOutFile.h \
Note: See TracChangeset
for help on using the changeset viewer.