Changeset 880


Ignore:
Timestamp:
Sep 22, 2007, 1:43:22 AM (14 years ago)
Author:
Peter
Message:

refs #244

Location:
trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Makefile.am

    r865 r880  
    3232  distance_test \
    3333  ensemble_test feature_selection_test fileutil_test inputranker_test \
    34   kernel_test kernel_lookup_test matrix_test matrix_lookup_test       \
     34  iterator_test kernel_test kernel_lookup_test matrix_test matrix_lookup_test \
    3535  nbc_test \
    3636  ncc_test nni_test pca_test regression_test rnd_test roc_test \
     
    5757fileutil_test_SOURCES = fileutil_test.cc
    5858inputranker_test_SOURCES = inputranker_test.cc
     59iterator_test_SOURCES = iterator_test.cc
    5960kernel_test_SOURCES = kernel_test.cc
    6061kernel_lookup_test_SOURCES = kernel_lookup_test.cc
  • trunk/yat/classifier/DataLookup1D.cc

    r865 r880  
    9393
    9494
     95  DataLookup1D::const_iterator DataLookup1D::begin(void) const
     96  {
     97    return DataLookup1D::const_iterator(*this, 0);
     98  }
     99
     100
     101  DataLookup1D::const_iterator DataLookup1D::end(void) const
     102  {
     103    return DataLookup1D::const_iterator(*this, size());
     104  }
     105
     106
    95107  size_t DataLookup1D::size(void) const
    96108  {
  • trunk/yat/classifier/DataLookup1D.h

    r865 r880  
    11#ifndef _theplu_yat_classifier_dataLookup1D_
    22#define _theplu_yat_classifier_dataLookup1D_
     3
     4#include "yat/utility/constIterator.h"
     5#include "yat/utility/Iterator.h"
    36
    47// $Id$
     
    4851  public:
    4952
     53    typedef utility::constIterator<const classifier::DataLookup1D>
     54    const_iterator;
     55
    5056    ///
    5157    /// Constructor.
     
    9197    ///
    9298    virtual ~DataLookup1D();
     99
     100    /**
     101     */
     102    const_iterator begin() const;
     103
     104    /**
     105     */
     106    const_iterator end() const;
    93107
    94108    ///
  • trunk/yat/utility/Makefile.am

    r865 r880  
    3232
    3333include_utility_HEADERS = \
    34   Alignment.h Exception.h FileUtil.h kNNI.h matrix.h NNI.h  \
     34  Alignment.h constIterator.h Exception.h FileUtil.h Iterator.h \
     35  kNNI.h matrix.h NNI.h \
    3536  PCA.h stl_utility.h SVD.h TypeInfo.h utility.h vector.h WeNNI.h
  • trunk/yat/utility/vector.cc

    r879 r880  
    195195
    196196
     197  vector::iterator vector::begin(void)
     198  {
     199    return vector::iterator(*this, 0);
     200  }
     201
     202
     203  vector::const_iterator vector::begin(void) const
     204  {
     205    return vector::const_iterator(*this, 0);
     206  }
     207
     208
    197209  const vector& vector::clone(const vector& other)
    198210  {
     
    247259    if (status)
    248260      throw utility::GSL_error(std::string("vector::div",status));
     261  }
     262
     263
     264  vector::iterator vector::end(void)
     265  {
     266    return vector::iterator(*this, size());
     267  }
     268
     269
     270  vector::const_iterator vector::end(void) const
     271  {
     272    return vector::const_iterator(*this, size());
    249273  }
    250274
  • trunk/yat/utility/vector.h

    r879 r880  
    2929*/
    3030
     31#include "constIterator.h"
    3132#include "Exception.h"
     33#include "Iterator.h"
    3234
    3335#include <iostream>
     
    8789  public:
    8890
     91    typedef Iterator<vector> iterator;
     92    typedef constIterator<const vector> const_iterator;
     93
    8994    /**
    9095       \brief The default constructor.
     
    215220
    216221    /**
     222     */
     223    iterator begin(void);
     224
     225    /**
     226     */
     227    const_iterator begin(void) const;
     228
     229    /**
    217230       \brief Make a copy of \a other.
    218231
     
    229242    */
    230243    void div(const vector& other);
     244
     245    /**
     246     */
     247    iterator end(void);
     248
     249    /**
     250     */
     251    const_iterator end(void) const;
    231252
    232253    /**
Note: See TracChangeset for help on using the changeset viewer.