TVec.Concat Method

Overload List

#SignatureDescription
1TVec Concat(TVec[] Src)Concatenates an array of TVec objects.
2TVec Concat(Int32 Index, TVec[] Src)Copies the contents of all TVec objects from the Src array to the calling vector elements, starting with at Index.

Overload 1: TVec Concat(TVec[] Src)

Concatenates an array of TVec objects.

#NameTypeDescription
1SrcTVec[]

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 Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties of the calling vector are set implicitly. An exception is raised, if Complex properties of TVec objects do not match.

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TVec a,b,c,d;
        MtxVec.CreateIt(out a, out b, out c, out d);
        try
        {
            a.SetIt(false, new double[] {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]
        }
        finally
        {
            MtxVec.FreeIt(ref a, ref b, ref c, ref d);
        }
    }
}
See Also: TVec.Split, TVec.Copy, Int32)

Overload 2: TVec Concat(Int32 Index, TVec[] Src)

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

#NameTypeDescription
1IndexInt32start index
2SrcTVec[]

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

Remarks:

The Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.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.