Changeset 813 in Sophya for trunk/SophyaLib/TArray/tvector.h
- Timestamp:
- Apr 5, 2000, 5:44:19 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tvector.h
r804 r813 11 11 class TVector : public TMatrix<T> { 12 12 public: 13 enum {SameTypeVector=0, ColumnVector=1, LineVector=2};14 13 // Creation / destruction 15 14 TVector(); … … 18 17 TVector(const TVector<T>& v, bool share); 19 18 TVector(const TArray<T>& a); 20 TVector(const TArray<T>& a, bool share, short lcv=ColumnVector, short mm=CMemoryMapping);19 TVector(const TArray<T>& a, bool share, short mm=CMemoryMapping, short lcv=ColumnVector); 21 20 22 21 virtual ~TVector(); … … 25 24 { Set(a); return(*this); } 26 25 27 // Vector type Line or Column vector28 inline short GetVectorType() const29 { return((marowi_ == veceli_) ? ColumnVector : LineVector); }30 26 31 27 // Gestion taille/Remplissage 32 void ReSize(uint_4 n, short lcv=Same TypeVector);33 void Realloc(uint_4 n, short lcv=Same TypeVector, bool force=false);28 void ReSize(uint_4 n, short lcv=SameVectorType ); 29 void Realloc(uint_4 n, short lcv=SameVectorType, bool force=false); 34 30 35 31 // Sub-Vector extraction $CHECK$ Reza 03/2000 Doit-on declarer cette methode const ? 36 TVector<T> operator () (Range relt) const ; 32 TVector<T> SubVector(Range relt) const ; 33 inline TVector<T> operator () (Range relt) const 34 { return SubVector(relt); } 37 35 38 36 // Informations pointeur/data … … 43 41 inline T& operator()(uint_4 n); 44 42 43 // Operateur d'affectation 44 inline TMatrix<T>& operator = (Sequence seq) { SetSeq(seq); return(*this); } 45 45 46 // Operations diverses avec une constante 46 inline TVector<T>& operator = (T x) { Set (x); return(*this); }47 inline TVector<T>& operator = (T x) { SetT(x); return(*this); } 47 48 inline TVector<T>& operator += (T x) { Add(x); return(*this); } 48 49 inline TVector<T>& operator -= (T x) { Sub(x); return(*this); } … … 56 57 // Norme(^2) 57 58 T Norm2() const ; 59 60 virtual string InfoString() const; 61 58 62 }; 59 63
Note:
See TracChangeset
for help on using the changeset viewer.