Changeset 1081 in Sophya for trunk/SophyaLib/TArray/tmatrix.cc
- Timestamp:
- Jul 24, 2000, 2:51:27 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tmatrix.cc
r996 r1081 1 // $Id: tmatrix.cc,v 1.1 2 2000-05-02 15:49:29ansari Exp $1 // $Id: tmatrix.cc,v 1.13 2000-07-24 12:51:27 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "machdefs.h" … … 99 99 UpdateMemoryMapping(a, mm); 100 100 } 101 102 template <class T> 103 TMatrix<T>::TMatrix(const BaseArray& a) 104 : TArray<T>() 105 { 106 SetBA(a); 107 } 108 109 101 110 102 111 //! Destructor … … 125 134 return(*this); 126 135 } 136 137 template <class T> 138 TArray<T>& TMatrix<T>::SetBA(const BaseArray& a) 139 { 140 if (a.NbDimensions() > 2) 141 throw SzMismatchError("TMatrix<T>::SetBA(const BaseArray& a) a.NbDimensions() > 2"); 142 TArray<T>::SetBA(a); 143 if (NbDimensions() == 1) { 144 size_[1] = 1; 145 step_[1] = size_[0]*step_[0]; 146 ndim_ = 2; 147 } 148 UpdateMemoryMapping(*this, SameMemoryMapping); 149 return(*this); 150 } 151 152 127 153 128 154 //! Resize the matrix
Note:
See TracChangeset
for help on using the changeset viewer.