Changeset 813 in Sophya for trunk/SophyaLib/TArray/tvector.h


Ignore:
Timestamp:
Apr 5, 2000, 5:44:19 PM (25 years ago)
Author:
ansari
Message:

Correction bug/amelioarions TArray,TMatrix,TVector - Reza 5/4/2000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/tvector.h

    r804 r813  
    1111class TVector : public TMatrix<T> {
    1212public:
    13   enum {SameTypeVector=0, ColumnVector=1, LineVector=2};
    1413  // Creation / destruction
    1514  TVector();
     
    1817  TVector(const TVector<T>& v, bool share);
    1918  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);
    2120
    2221  virtual ~TVector();
     
    2524                       { Set(a);  return(*this); }
    2625
    27   // Vector type   Line or Column vector
    28   inline short GetVectorType() const
    29                { return((marowi_ == veceli_) ? ColumnVector : LineVector); }
    3026
    3127  // Gestion taille/Remplissage
    32   void ReSize(uint_4 n, short lcv=SameTypeVector );
    33   void Realloc(uint_4 n, short lcv=SameTypeVector, bool force=false);
     28  void ReSize(uint_4 n, short lcv=SameVectorType );
     29  void Realloc(uint_4 n, short lcv=SameVectorType, bool force=false);
    3430
    3531  // 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); }
    3735
    3836  // Informations pointeur/data
     
    4341  inline T&       operator()(uint_4 n);
    4442
     43  // Operateur d'affectation
     44  inline  TMatrix<T>&  operator = (Sequence seq)    { SetSeq(seq); return(*this); }
     45
    4546  // 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); }
    4748  inline  TVector<T>&  operator += (T x)            { Add(x); return(*this); }
    4849  inline  TVector<T>&  operator -= (T x)            { Sub(x); return(*this); }
     
    5657  // Norme(^2)
    5758  T Norm2() const ;
     59
     60  virtual string InfoString() const;
     61
    5862};
    5963
Note: See TracChangeset for help on using the changeset viewer.