Changeset 1393 in Sophya for trunk/SophyaLib/TArray/tarray.cc
- Timestamp:
- Feb 12, 2001, 6:09:03 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tarray.cc
r1389 r1393 230 230 231 231 232 //! Resize array232 //! Sets or changes the array size 233 233 /*! 234 234 \param ndim : number of dimensions … … 245 245 throw( ParmError("TArray<T>::ReSize(,siz[0]>1 && size[1]>1) for Vector" ) ); 246 246 } 247 string exmsg = "TArray<T>::ReSize( )";247 string exmsg = "TArray<T>::ReSize(int_4 ...)"; 248 248 if (!UpdateSizes(ndim, siz, step, 0, exmsg)) throw( ParmError(exmsg) ); 249 249 mNDBlock.ReSize(totsize_); 250 } 251 252 //! Sets or changes the array size. 253 /*! 254 The array size and memory layout are copied from the array \b a. 255 \param a : Array used as template for setting the size and memory layout. 256 */ 257 template <class T> 258 void TArray<T>::ReSize(const TArray<T>& a) 259 { 260 if (arrtype_ != 0) { 261 if (a.NbDimensions() != 2) 262 throw( ParmError("TArray<T>::ReSize(a.NbDimensions()!=2,...) for Matrix" ) ); 263 if ((arrtype_ == 2) && (a.Size(0) > 1) && (a.Size(1) > 1)) 264 throw( ParmError("TArray<T>::ReSize(a.Size(0)>1 && a.Size(1)>1) for Vector" ) ); 265 } 266 string exmsg = "TArray<T>::ReSize(const TArray<T>&)"; 267 if (!UpdateSizes(a, exmsg)) throw( ParmError(exmsg) ); 268 mNDBlock.ReSize(totsize_); 250 269 } 251 270
Note:
See TracChangeset
for help on using the changeset viewer.