Matrix.SetRow Method

Overload List

#SignatureDescription
1function SetRow(const Vec: TDenseMtxVec; Row: Integer): TMtx;Copies values from vector to matrix row.
2function SetRow(const Vec: TDenseMtxVec; VecIndex: Integer; Row: Integer; Col: Integer; Len: Integer): TMtx;Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row,Col+Len-1].

Overload 1: function SetRow(const Vec: TDenseMtxVec; Row: Integer): TMtx;

Copies values from vector to matrix row.

#NameTypeDescription
1VecTDenseMtxVec
2RowInteger

Result: stored in self (calling object), returns self for chaining

Remarks:

Copy all Vec elements to the calling matrix Row row. The Matrix.Complex property of the calling matrix is adjusted automatically. An exception is raised, if array bounds are overrun.

Examples
var  A: Matrix;
    V: Vector;
begin
    A.Size(1,2,True);
    V.SetIt(True,[1,2, 2,4]);  // complex vector
    A.SetCol(V,0);
end;
See Also: Matrix.SetCol

Overload 2: function SetRow(const Vec: TDenseMtxVec; VecIndex: Integer; Row: Integer; Col: Integer; Len: Integer): TMtx;

Copy vector Vec elements [VecIndex]..[VecIndex+Len-1] to the calling matrix elements [Row,Col]..[Row,Col+Len-1].

#NameTypeDescription
1VecTDenseMtxVec
2VecIndexInteger
3RowInteger
4ColInteger
5LenIntegerelement count

Result: stored in self (calling object), returns self for chaining

Remarks:

An exception is raised if condition checking is enabled and array bounds are overrun. An exception is raised, if Vec and the calling matrix complex properties do not match.