TMtxInt.SetCol Method

Overload List

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

Overload 1: function SetCol(const Vec: TMtxVecInt; Col: Integer): TMtxInt;

Copies values from vector to matrix column.

#NameTypeDescription
1VecTMtxVecInt
2ColInteger

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

Remarks:

Copy all Vec elements to the calling matrix Col column. An exception is raised, if array bounds are overrun.

Examples
var  A: TMtxInt;
    V: TVecInt;
begin
    CreateIt(A);
    CreateIt(V);
    try
        A.Size(2,1);
        V.SetIt([1,2, 2,4]);
        A.SetCol(V,0);
    finally
        FreeIt(V);
        FreeIt(A);
    end;
end;
See Also: TMtxInt.SetRow

Overload 2: function SetCol(const Vec: TMtxVecInt; VecIndex: Integer; Row: Integer; Col: Integer; Len: Integer): TMtxInt;

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

#NameTypeDescription
1VecTMtxVecInt
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.