Ignore:
Timestamp:
Feb 1, 2008, 4:49:13 AM (14 years ago)
Author:
Peter
Message:

fixing tests for new vector design

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/peter-dev/yat/utility/vectorView.h

    r995 r1008  
    2929*/
    3030
    31 #include "vectorMutable.h"
     31#include "vectorBase.h"
    3232
    3333#include "Exception.h"
     
    8787  */
    8888
    89   class vectorView : public vectorMutable
     89  class vectorView : public vectorBase
    9090  {
    9191  public:
     
    101101       \brief The copy constructor.
    102102    */
    103     vectorView(vectorMutable& other);
     103    vectorView(vectorBase& other);
     104    vectorView(vectorView& other);
     105    // Peter, privatize
     106    vectorView(const vectorView& other);
    104107
    105108    /**
     
    122125       \throw GSL_error if a view cannot be set up.
    123126    */
    124     vectorView(vectorMutable& v, size_t offset, size_t n, size_t stride=1);
     127    vectorView(vectorBase& v, size_t offset, size_t n, size_t stride=1);
     128    // Peter, privatize
     129    vectorView(const vectorBase& v, size_t offset, size_t n, size_t stride=1);
    125130
    126131    ///
     
    146151    vectorView(matrix& m, size_t i, bool row=true);
    147152
     153    // Peter should be private
     154    vectorView(const matrix& m, size_t i, bool row=true);
     155
    148156    /**
    149157     */
    150     vectorView(proxy p);
     158    //vectorView(proxy p);
    151159
    152160    ///
     
    154162    ///
    155163    ~vectorView(void);
     164
     165    /**
     166       \return true
     167    */
     168    bool isview(void) const;
    156169
    157170    /**
     
    162175       \throw GSL_error if dimensions mis-match.
    163176    */
    164     const vectorMutable& operator=(vectorMutable&);
     177    const vectorBase& operator=(const vectorBase&);
     178    const vectorBase& operator=(const vectorView&);
    165179
    166     const vectorMutable& operator=(proxy);
     180    //const vectorBase& operator=(proxy);
    167181
    168182  private:
    169     void clean_up(void);
     183    const vectorBase& assign(const vectorBase& other);
     184    void delete_allocated_memory(void);
    170185
    171186    gsl_vector_view* view_;
     187    gsl_vector_const_view* const_view_;
    172188   
    173189  };
Note: See TracChangeset for help on using the changeset viewer.