Vector.Concat Method

Overload List

#SignatureDescription
1function Concat(const Src: TVecArray): TVec;Concatenates an array of TVec objects.
2function Concat(Index: Integer; const Src: TVecArray): TVec;Copies the contents of all TVec objects from the Src array to the calling vector elements, starting with at Index.

Overload 1: function Concat(const Src: TVecArray): TVec;

Concatenates an array of TVec objects.

#NameTypeDescription
1SrcTVecArray

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

Remarks:

Concatenates an array of TVec objects. The method copies the contents of all TVec objects from the Src array to the calling object. The Vector.Length and Vector.Complex properties of the calling vector are set implicitly. An exception is raised, if Complex properties of TVec objects do not match.

Examples
var a,b,c,d: Vector;
begin
    a.SetIt(False,[1,2,3]);
    b.Copy(a);
    c.Concat([a,b]); // c = [1,2,3,1,2,3]
    d.Size(10,True);
    d.SetZero(0,4);
    d.Concat(4,[c]); // d = [0,0,0,0,1,2,3,1,2,3]
end;
See Also: Vector.Split, Vector.Copy

Overload 2: function Concat(Index: Integer; const Src: TVecArray): TVec;

Copies the contents of all TVec objects from the Src array to the calling vector elements, starting with at Index.

#NameTypeDescription
1IndexIntegerstart index
2SrcTVecArray

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

Remarks:

The Vector.Length and Vector.Complex properties of the calling vector must be set explicitly. An exception is raised, if Complex properties of TVec objects do not match or if the sum of Length's exceeds the Length property of the calling object.