Changeset 2917 in Sophya for trunk/SophyaLib/TArray/tmatrix.cc
- Timestamp:
- Feb 23, 2006, 2:50:26 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/TArray/tmatrix.cc
r2915 r2917 1 // $Id: tmatrix.cc,v 1.3 4 2006-02-22 18:17:30ansari Exp $1 // $Id: tmatrix.cc,v 1.35 2006-02-23 13:50:26 ansari Exp $ 2 2 // C.Magneville 04/99 3 3 #include "sopnamsp.h" … … 17 17 two dimensional arrays as matrices. Matrix and vector operations, 18 18 such as matrix multiplication or transposition is implemented. 19 20 Sub-matrices, in particular matrix rows and columns can easily and 21 efficiently be extracted and manipulated. 22 It should be noted that a significant memory overhead is associated with 23 small matrices (typically less than 10x10=100 elements).However, 24 higher dimension arrays (3D for examples) can be used to represent large 25 number of small matrices or vectors. 26 19 27 \b Matrix is a typedef for double precision floating point matrix ( TMatrix<r_8> ). 20 28 21 29 \sa SOPHYA::TArray SOPHYA::TVector 22 \sa SOPHYA::Range \saSOPHYA::Sequence23 \sa SOPHYA::MathArray \saSOPHYA::SimpleMatrixOperation30 \sa SOPHYA::Range SOPHYA::Sequence 31 \sa SOPHYA::MathArray SOPHYA::SimpleMatrixOperation 24 32 25 33 The following sample code illustrates vector-matrix multiplication … … 254 262 if (mm == CMemoryMapping) { rx = rcol; ry = rline; } 255 263 else { ry = rcol; rx = rline; } 256 TMatrix sm(SubArray(rx, ry, Range::first(), Range::first(), Range::first() ), true);264 TMatrix sm(SubArray(rx, ry, Range::first(), Range::first(), Range::first(), false), true); 257 265 sm.UpdateMemoryMapping(mm); 258 266 return(sm);
Note:
See TracChangeset
for help on using the changeset viewer.