Changeset 1126 for trunk/yat/utility


Ignore:
Timestamp:
Feb 22, 2008, 11:31:39 PM (14 years ago)
Author:
Peter
Message:

working on ticket:234

Location:
trunk/yat/utility
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Index.cc

    r1106 r1126  
    4747
    4848
     49  Index::Index(const std::vector<size_t>& vec)
     50    : index_(SmartPtr<const std::vector<size_t> >(new std::vector<size_t>(vec)))
     51  {}
     52
     53
    4954  Index::Index(const Index& a, const Index& b)
    5055  {
     
    6368
    6469
     70  const std::vector<size_t>& Index::vector(void) const
     71  {
     72    return *index_;
     73  }
     74
     75
    6576  const size_t& Index::operator[](size_t i) const
    6677  {
  • trunk/yat/utility/Index.h

    r1106 r1126  
    6363
    6464    /**
    65        \brief access operator
    66     */
    67     const size_t& operator[](size_t) const;
     65       \brief Constructor
     66
     67       \a vec is copied
     68     */
     69    explicit Index(const std::vector<size_t>& vec);
    6870
    6971    /**
     
    7173    */
    7274    size_t size(void) const;
     75
     76    /**
     77       \brief underlying std::vector
     78    */
     79    const std::vector<size_t>& vector(void) const;
     80
     81    /**
     82       \brief access operator
     83    */
     84    const size_t& operator[](size_t) const;
    7385
    7486  private:
Note: See TracChangeset for help on using the changeset viewer.