TAbstractMtxVecInt.Copy Method

function Copy(const Src: TMtxVecInt): TMtxVecInt;

Copy object values.

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt

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

Remarks:

Copy each of Vec elements to the calling object. The Size property of the calling object is set implicitly to match Vec object.

Examples
begin
    TMtxVecInt a,b,c;
    a = new TMtxVecInt();
    b = new TMtxVecInt();
    a.SetIt(new int[] {1,2,3,4});  // a = [1,2,3,4] i.e 1+2i ; 3+4i
    b.Copy(a);                // b = [1,2,3,4]
end;

Indexed: function Copy(const Src: TMtxVecInt; SrcIndex: Integer; Index: Integer; Len: Integer): TMtxVecInt;

Copy Src elements [SrcIndex]..[SrcIndex+Len-1] in the calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1SrcTMtxVecIntsource TVecInt or TMtxInt
2SrcIndexIntegersource start index
3IndexIntegerstart index
4LenIntegerelement count

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

Remarks:

Calling vector TMtxVecInt.Size must be set explicitly. An exception is raised if array borders are overrun or underrun.