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....


Unit: SDL_matrix
Class: TMatrix
Declaration: [1] procedure CopyFromVec (VecSource: TVector; Source1stElem, SourceLastElem, DestCol, DestRow: integer);
[2] procedure CopyFromVec (Dim: TDims; VecSource: TVector; Source1stElem, SourceLastElem, DestCol, DestRow: integer);

The method CopyFromVec copies a part of the external vector VecSource into its own data area (self ). The source vector is an instance of class TVector. The elements to be copied are specified by the the parameters Source1stElem, and SourceLastElem.

While version [1] always copies column vectors, version [2] of the method allows to specify the orientation of the vector to be copied. The parameter Dim may assume either dimX (row vector) or dimY (column vector), other values are ignored.

The destination position is defined by the parameters DestCol and DestRow. The element [DestCol, DestRow ] is filled by the value of the source vector at address [Source1stElem, SourceLastElem ] and all other elements are copied to higher addresses accordingly.

Hint: Source1stElem needs not to be lower than SourceLastElem since the method CopyFromVec automatically allows for the correct copying sequence.

Last Update: 2015-May-13