Changeset 2267 in Sophya for trunk/SophyaLib/TArray/tarray.cc
- Timestamp:
- Nov 15, 2002, 10:35:44 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tarray.cc
r2153 r2267 12 12 \class SOPHYA::TArray 13 13 \ingroup TArray 14 Class for template arrays 15 16 This class implements arrays of dimensions up to14 Class for template arrays with numerical data types (int, float, complex). 15 16 This class implements arrays with number of dimensions up to 17 17 \ref BASEARRAY_MAXNDIMS "BASEARRAY_MAXNDIMS" 18 19 Standard arithmetic operations on numerical arrays are implemented, 20 as well as sub-array manipulation services. 21 \b Array is a typedef for double precision floating point arrays ( TArray<r_8> ) 22 \sa SOPHYA::Range 23 \sa SOPHYA::Sequence 24 \sa SOPHYA::MathArray 25 26 \code 27 #include "array.h" 28 // ... 29 // Creating and initialising a 1-D array of integers 30 TArray<int> ia(5); 31 EnumeratedSequence es; 32 es = 24, 35, 46, 57, 68; 33 ia = es; 34 cout << "Array<int> ia = " << ia; 35 // 2-D array of floats 36 TArray<r_4> b(6,4), c(6,4); 37 // Initializing b with a constant 38 b = 2.71828; 39 // Filling c with random numbers 40 c = RandomSequence(); 41 // Arithmetic operations 42 TArray<r_4> d = b+0.3f*c; 43 cout << "Array<float> d = " << d; 44 \endcode 45 18 46 */ 19 47
Note:
See TracChangeset
for help on using the changeset viewer.