Changeset 914 in Sophya for trunk/SophyaLib/TArray
- Timestamp:
- Apr 13, 2000, 6:04:50 PM (25 years ago)
- Location:
- trunk/SophyaLib/TArray
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tmatrix.h
r894 r914 23 23 TMatrix(const TMatrix<T>& a, bool share); 24 24 TMatrix(const TArray<T>& a); 25 TMatrix(const TArray<T>& a, bool share, short mm= CMemoryMapping);25 TMatrix(const TArray<T>& a, bool share, short mm=AutoMemoryMapping); 26 26 virtual ~TMatrix(); 27 27 -
trunk/SophyaLib/TArray/triangmtx.h
r862 r914 1 1 // This may look like C code, but it is really -*- C++ -*- 2 /*! Class for inferior triangular matrix (base class for the class Alm) */3 2 4 3 #ifndef TRIANGMTX_H_SEEN … … 10 9 namespace SOPHYA { 11 10 11 //! Class for inferior triangular matrix (base class for the class Alm) 12 12 template <class T> 13 class TriangularMatrix 14 { 15 16 public : 13 class TriangularMatrix { 14 public : 17 15 16 //! Default constructor 18 17 TriangularMatrix() {}; 19 /* instanciate a triangular matrix from the number of rows */ 18 //! instanciate a triangular matrix from the number of rows 20 19 TriangularMatrix(int rowSize) : long_diag_((uint_4)rowSize) {elem_.ReSize((uint_4) (rowSize*(rowSize+1)/2) ); }; 20 //! Copy constructor (possibility of sharing datas) 21 21 TriangularMatrix(const TriangularMatrix<T>& a, bool share=false) : elem_(a.elem_, share), long_diag_(a.long_diag_) {;} 22 /*! resize the matrix with a new number of rows */ 22 23 //! resize the matrix with a new number of rows 23 24 inline void ReSizeRow(int rowSize) 24 25 { … … 28 29 inline void SetTemp(bool temp=false) const {elem_.SetTemp(temp);} 29 30 31 //! Equal operator 30 32 inline TriangularMatrix<T>& operator = (const TriangularMatrix<T>& a) 31 33 { … … 34 36 return *this; 35 37 } 38 39 //! () operator : access to elements row \b l and column \b m 36 40 inline T& operator()(int l, int m) 37 41 { 38 42 return elem_(adr_ij(l,m)); 39 43 } 44 //! () operator : access to elements row \b l and column \b m 40 45 inline T const& operator()(int l, int m) const 41 46 { 42 47 return *(elem_.Begin()+ adr_ij(l,m)); 43 48 } 44 inline int_4 rowNumber() const {return (int_4)long_diag_;} 45 private: 46 /*! compute the address of an element in the single array representing the matrix */ 49 50 //! Return number of rows 51 inline int_4 rowNumber() const {return (int_4)long_diag_;} 52 53 private: 54 //! compute the address of an element in the single array representing the matrix 47 55 inline uint_4 adr_ij(int i,int j) const 48 56 { … … 56 64 } 57 65 58 uint_4 long_diag_; 59 NDataBlock<T> elem_; 66 uint_4 long_diag_; //!< size of the square matrix 67 NDataBlock<T> elem_; //!< Data block 60 68 61 69 }; -
trunk/SophyaLib/TArray/tvector.cc
r894 r914 1 // $Id: tvector.cc,v 1. 4 2000-04-12 17:42:30ansari Exp $1 // $Id: tvector.cc,v 1.5 2000-04-13 16:04:49 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 70 70 */ 71 71 template <class T> 72 TVector<T>::TVector(const TArray<T>& a, bool share, short mm, short lcv)72 TVector<T>::TVector(const TArray<T>& a, bool share, short lcv, short mm) 73 73 : TMatrix<T>(a, share, mm) 74 74 { -
trunk/SophyaLib/TArray/tvector.h
r898 r914 17 17 // Creation / destruction 18 18 TVector(); 19 TVector(uint_4 n, short lcv= ColumnVector, short mm=AutoMemoryMapping);19 TVector(uint_4 n, short lcv=AutoVectorType, short mm=AutoMemoryMapping); 20 20 TVector(const TVector<T>& v); 21 21 TVector(const TVector<T>& v, bool share); 22 22 TVector(const TArray<T>& a); 23 TVector(const TArray<T>& a, bool share, short mm=CMemoryMapping, short lcv=ColumnVector);23 TVector(const TArray<T>& a, bool share, short lcv=AutoVectorType, short mm=AutoMemoryMapping); 24 24 25 25 virtual ~TVector(); … … 28 28 inline TVector<T>& operator = (const TVector<T>& a) 29 29 { Set(a); return(*this); } 30 31 30 32 31 // Gestion taille/Remplissage … … 50 49 // Operateur d'affectation 51 50 //! Fill the vector with Sequence \b seq 52 inline T Matrix<T>& operator = (Sequence seq) { SetSeq(seq); return(*this); }51 inline TVector<T>& operator = (Sequence seq) { SetSeq(seq); return(*this); } 53 52 54 53 // Operations diverses avec une constante
Note:
See TracChangeset
for help on using the changeset viewer.