Changeset 880 for trunk/yat/utility


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

refs #244

Location:
trunk/yat/utility
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • 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.