|The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....|
|Home MathPack Matrix Classes TIntMatrix, TMatrix and TMat3D Methods CopyFrom|
|See also: CopyFromVec, Clone|
The method CopyFrom copies a part of the matrix MatSource into its own data area (self). TMatrix can copy values TMatrix, TIntMatrix and TMat3D classes (overloaded versions  to ).
The region to be copied is specified by the the parameters SourceColLo, SourceRowLo, SourceColHi, and SourceRowHi (see figure below). In the case of a three-dimensional source matrix, the layer has to specified as well (parameter SourceLayer).
The destination area is defined by the parameters DestCol and DestRow. The element [DestCol,DestRow ] is filled by the value of the source matrix at address [SourceColLo,SourceRowLo ] and all other elements are copied to appropriate higher addresses. The figure below shows the copy process.