MtxExpr.Concat Method

Overload List

#SignatureDescription
1Vector Concat(TMtxVec X1, TMtxVec X2)Concatenates multiple Vectors in to a single one.
2Vector Concat(TVec[] Src)Concatenates multiple Vectors in to a single one.
3Matrix Concat(Int32 ARows, Int32 ACols, TMtx[] Src)Concatenate a list of matrices in to one big matrix.

Overload 1: Vector Concat(TMtxVec X1, TMtxVec X2)

Concatenates multiple Vectors in to a single one.

#NameTypeDescription
1X1TMtxVecsource TVec or TMtx
2X2TMtxVecsource TVec or TMtx

Returns: Vector

Remarks:

Internally calls Dew.Math.Vector.Concat

Overload 2: Vector Concat(TVec[] Src)

Concatenates multiple Vectors in to a single one.

#NameTypeDescription
1SrcTVec[]

Returns: Vector

Remarks:

Internally calls Dew.Math.Vector.Concat

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);
        }
    }
}

Overload 3: Matrix Concat(Int32 ARows, Int32 ACols, TMtx[] Src)

Concatenate a list of matrices in to one big matrix.

#NameTypeDescription
1ARowsInt32
2AColsInt32
3SrcTMtx[]

Returns: Matrix

Remarks:

Internally calls Dew.Math.Matrix.Concat

Examples
TMtx A;
TMtx B;
TMtx C;
TMtx D;
TMtx E;
MtxVec.CreateIt(out A, out B, out C, out D);
MtxVec.CreateIt(out E);
try
    {
        A.Size(2,2);
        B.Size(A);
        C.Size(A);
        D.Size(A);
        E.Concat(2,2,[A,B
        C,D]);  // form one 4x4 matrix
    }
finally
    {
        MtxVec.FreeIt(ref E);
        MtxVec.FreeIt(ref A, ref B, ref C, ref D);
    }