Changeset 894 in Sophya for trunk/SophyaLib/TArray/tmatrix.cc
- Timestamp:
- Apr 12, 2000, 7:42:33 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tmatrix.cc
r850 r894 1 // $Id: tmatrix.cc,v 1. 5 2000-04-10 12:57:44ansari Exp $1 // $Id: tmatrix.cc,v 1.6 2000-04-12 17:42:21 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 12 12 //////////////////////////////////////////////////////////////// 13 13 //**** Createur, Destructeur 14 //! Default constructor 14 15 template <class T> 15 16 TMatrix<T>::TMatrix() … … 20 21 } 21 22 23 //! constructor of a matrix with r lines et c columns. 24 /*! 25 \param r : number of rows 26 \param c : number of columns 27 \param mm : define the memory mapping type 28 \sa ReSize 29 */ 22 30 template <class T> 23 31 TMatrix<T>::TMatrix(uint_4 r,uint_4 c, short mm) … … 30 38 } 31 39 40 //! Constructor by copy (share data if \b a is temporary). 32 41 template <class T> 33 42 TMatrix<T>::TMatrix(const TMatrix<T>& a) … … 37 46 } 38 47 48 //! Constructor by copy 49 /*! 50 \param share : if true, share data. If false copy data 51 */ 39 52 template <class T> 40 53 TMatrix<T>::TMatrix(const TMatrix<T>& a, bool share) … … 44 57 } 45 58 46 59 //! Constructor of a matrix from a TArray \b a 47 60 template <class T> 48 61 TMatrix<T>::TMatrix(const TArray<T>& a) … … 59 72 } 60 73 74 //! Constructor of a matrix from a TArray \b a 75 /*! 76 \param a : TArray to be copied or shared 77 \param share : if true, share data. If false copy data 78 \param mm : define the memory mapping type 79 */ 61 80 template <class T> 62 81 TMatrix<T>::TMatrix(const TArray<T>& a, bool share, short mm ) … … 73 92 } 74 93 94 //! Destructor 75 95 template <class T> 76 96 TMatrix<T>::~TMatrix() 77 // Destructeur 78 { 79 80 } 81 97 { 98 } 99 100 //! Set matirx equal to \b a and return *this 82 101 template <class T> 83 102 TArray<T>& TMatrix<T>::Set(const TArray<T>& a) … … 95 114 } 96 115 116 //! Resize the matrix 117 /*! 118 \param r : number of rows 119 \param c : number of columns 120 \param mm : define the memory mapping type 121 (SameMemoryMapping,CMemoryMapping 122 ,FortranMemoryMapping,DefaultMemoryMapping) 123 */ 97 124 template <class T> 98 125 void TMatrix<T>::ReSize(uint_4 r, uint_4 c, short mm) … … 115 142 } 116 143 144 //! Re-allocate space for the matrix 145 /*! 146 \param r : number of rows 147 \param c : number of columns 148 \param mm : define the memory mapping type 149 \param force : if true re-allocation is forced, if not it occurs 150 only if the required space is greater than the old one. 151 \sa ReSize 152 */ 117 153 template <class T> 118 154 void TMatrix<T>::Realloc(uint_4 r,uint_4 c, short mm, bool force) … … 136 172 137 173 // $CHECK$ Reza 03/2000 Doit-on declarer cette methode const ? 174 //! Return a submatrix define by \b Range \b rline and \b rcol 138 175 template <class T> 139 176 TMatrix<T> TMatrix<T>::SubMatrix(Range rline, Range rcol) const … … 151 188 //////////////////////////////////////////////////////////////// 152 189 // Transposition 190 //! Transpose matrix in place 153 191 template <class T> 154 192 TMatrix<T>& TMatrix<T>::Transpose() … … 163 201 164 202 203 //! Transpose matrix into new matrix 204 /*! 205 \param mm : define the memory mapping type 206 (SameMemoryMapping,CMemoryMapping,FortranMemoryMapping) 207 \return return a new matrix 208 */ 165 209 template <class T> 166 210 TMatrix<T> TMatrix<T>::Transpose(short mm) … … 175 219 } 176 220 177 // Rearrangement memoire 178 // Si identique, renvoie une matrice qui partage les donnees 221 //! Rearrange data in memory memoire according to \b mm 222 /*! 223 \param mm : define the memory mapping type 224 (SameMemoryMapping,CMemoryMapping,FortranMemoryMapping) 225 \warning If identical, return a matrix that share the datas 226 */ 179 227 template <class T> 180 228 TMatrix<T> TMatrix<T>::Rearrange(short mm) … … 195 243 } 196 244 245 //! Set the matrix to the identity matrix \b imx 197 246 template <class T> 198 247 TMatrix<T>& TMatrix<T>::SetIdentity(IdentityMatrix imx) … … 215 264 //////////////////////////////////////////////////////////////// 216 265 //**** Impression 266 //! Return info on number of rows, column and type \b T 217 267 template <class T> 218 268 string TMatrix<T>::InfoString() const … … 226 276 } 227 277 278 //! Print matrix 279 /*! 280 \param maxprt : maximum numer of print 281 \param si : if true, display attached DvList 282 \sa SetMaxPrint 283 */ 228 284 template <class T> 229 285 void TMatrix<T>::Print(ostream& os, int_4 maxprt, bool si) const … … 252 308 //////////////////////////////////////////////////////////////// 253 309 310 //! Return the matrix product C = (*this)*B 311 /*! 312 \param mm : define the memory mapping type for the return matrix 313 */ 254 314 template <class T> 255 315 TMatrix<T> TMatrix<T>::Multiply(const TMatrix<T>& b, short mm) const
Note:
See TracChangeset
for help on using the changeset viewer.