Changeset 1412 in Sophya for trunk/SophyaLib
- Timestamp:
- Feb 20, 2001, 7:29:18 PM (25 years ago)
- Location:
- trunk/SophyaLib/TArray
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tmatrix.cc
r1156 r1412 1 // $Id: tmatrix.cc,v 1.1 6 2000-08-29 16:10:30ansari Exp $1 // $Id: tmatrix.cc,v 1.17 2001-02-20 18:29:17 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 244 244 //////////////////////////////////////////////////////////////// 245 245 // Transposition 246 //! Transpose matrix in place 247 template <class T> 248 TMatrix<T>& TMatrix<T>::Transpose ()246 //! Transpose matrix in place, by changing the memory mapping 247 template <class T> 248 TMatrix<T>& TMatrix<T>::TransposeSelf() 249 249 { 250 250 short vt = (marowi_ == veceli_) ? ColumnVector : RowVector; … … 257 257 258 258 259 //! Transpose matrix into new matrix 259 //! Returns the transpose of the original matrix. 260 /*! 261 The data is shared between the two matrices 262 \return return a new matrix 263 */ 264 template <class T> 265 TMatrix<T> TMatrix<T>::Transpose() 266 { 267 TMatrix<T> tm(*this); 268 tm.TransposeSelf(); 269 return tm; 270 } 271 272 //! Returns a new matrix, corresponding to the transpose of the original matrix 260 273 /*! 261 274 \param mm : define the memory mapping type … … 275 288 } 276 289 277 //! Rearrange data in memory memoireaccording to \b mm290 //! Rearrange data in memory according to \b mm 278 291 /*! 279 292 \param mm : define the memory mapping type -
trunk/SophyaLib/TArray/tmatrix.h
r1156 r1412 48 48 inline sa_size_t NCol() const {return Size(macoli_); } // back-compat Peida 49 49 50 void ReSize(sa_size_t r,sa_size_t c, short mm=BaseArray::SameMemoryMapping); // Reallocation de place 50 void ReSize(sa_size_t r,sa_size_t c, short mm=BaseArray::SameMemoryMapping); 51 //! a synonym (alias) for method ReSize(sa_size_t, sa_size_t, short) 52 inline void SetSize(sa_size_t r,sa_size_t c, short mm=BaseArray::SameMemoryMapping) 53 { ReSize(r, c, mm); } 54 // Reallocation de place 51 55 void Realloc(sa_size_t r,sa_size_t c, short mm=BaseArray::SameMemoryMapping, bool force=false); 52 56 … … 69 73 70 74 // Operations matricielles 71 TMatrix<T>& Transpose(); 75 TMatrix<T>& TransposeSelf(); 76 TMatrix<T> Transpose(); 72 77 //mm = SameMemoryMapping or CMemoryMapping or FortranMemoryMapping 73 78 TMatrix<T> Transpose(short mm); -
trunk/SophyaLib/TArray/tvector.h
r1156 r1412 40 40 // Gestion taille/Remplissage 41 41 void ReSize(sa_size_t n, short lcv=SameVectorType ); 42 //! a synonym (alias) for method ReSize(sa_size_t, short) 43 inline void SetSize(sa_size_t n, short lcv=SameVectorType ) 44 { ReSize(n, lcv); } 42 45 void Realloc(sa_size_t n, short lcv=SameVectorType, bool force=false); 43 46 -
trunk/SophyaLib/TArray/utilarr.cc
r1404 r1412 154 154 /*! 155 155 Define a range of indexes 156 \param start : start index 157 \param end : start end158 \param size : size 159 \param step : step 156 \param start : start index (inclusive) 157 \param end : end index (inclusive) 158 \param size : size (number of elements, used if end \<= start) 159 \param step : step (or stride) 160 160 161 161 \warning If \b end \> \b start, \b size is computed automatically
Note:
See TracChangeset
for help on using the changeset viewer.