Changeset 894 in Sophya for trunk/SophyaLib/TArray/tvector.h
- Timestamp:
- Apr 12, 2000, 7:42:33 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tvector.h
r813 r894 8 8 namespace SOPHYA { 9 9 10 //! Class of vector (line or column) 11 /*! 12 \sa TMatrix TArray 13 */ 10 14 template <class T> 11 15 class TVector : public TMatrix<T> { … … 21 25 virtual ~TVector(); 22 26 27 //! Operator = 23 28 inline TVector<T>& operator = (const TVector<T>& a) 24 29 { Set(a); return(*this); } … … 31 36 // Sub-Vector extraction $CHECK$ Reza 03/2000 Doit-on declarer cette methode const ? 32 37 TVector<T> SubVector(Range relt) const ; 38 //! Extract a vector define by Range \b relt 33 39 inline TVector<T> operator () (Range relt) const 34 40 { return SubVector(relt); } 35 41 36 42 // Informations pointeur/data 43 //! return the number of elements 37 44 inline uint_4 NElts() const {return Size(); } 38 45 … … 42 49 43 50 // Operateur d'affectation 51 //! Fill the 44 52 inline TMatrix<T>& operator = (Sequence seq) { SetSeq(seq); return(*this); } 45 53 46 54 // Operations diverses avec une constante 55 //! Set vector elements to constant value \b x 47 56 inline TVector<T>& operator = (T x) { SetT(x); return(*this); } 57 //! Add constant value \b x to vector elements 48 58 inline TVector<T>& operator += (T x) { Add(x); return(*this); } 59 //! Substract constant value \b x to vector elements 49 60 inline TVector<T>& operator -= (T x) { Sub(x); return(*this); } 61 //! Multiply vector elements by constant value \b x 50 62 inline TVector<T>& operator *= (T x) { Mul(x); return(*this); } 63 //! Divide vector elements by constant value \b x 51 64 inline TVector<T>& operator /= (T x) { Div(x); return(*this); } 52 65 53 66 // operations avec matrices 67 //! += : add a vector in place 54 68 inline TVector<T>& operator += (const TVector<T>& a) { AddElt(a); return(*this); } 69 //! += : substract a vector in place 55 70 inline TVector<T>& operator -= (const TVector<T>& a) { SubElt(a); return(*this); } 56 71 … … 63 78 64 79 // ---- inline acces methods ------ 80 81 //! Return the value of element \b n 65 82 template <class T> 66 83 inline T const& TVector<T>::operator()(uint_4 n) const … … 73 90 } 74 91 92 //! Return the value of element \b n 75 93 template <class T> 76 94 inline T & TVector<T>::operator()(uint_4 n) … … 84 102 85 103 // Typedef pour simplifier et compatibilite Peida 104 //! Define Vector to be TVector<r_8> 86 105 typedef TVector<r_8> Vector; 87 106
Note:
See TracChangeset
for help on using the changeset viewer.