TMtx::Concat Method

TMtx *Concat(int ARows, int ACols, const DewArray<TMtx *> &Src);

Concatenate an array of matrices to single matrix.

#NameTypeDescription
1ARowsint
2AColsint
3Srcconst DewArray<TMtx *> &
Remarks:

Concatenate an array of matrices to form one big matrix and store the result in the calling matrix. The dimensions of the block matrices in the Src array must match, to form the new matrix. The block matrices must be all real or all complex, otherwise an exception will be raised. You must specify Arows*ACols block matrices in the Src array. The TMtx::Rows, TMtx::Cols and TMtx::Complex properties of the calling matrix are adjusted automatically.

Examples
#include "MtxVec.h"
#include "Units.MtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;

void Example()
{
    TMtx *A, *B, *C, *D, *E;

    CreateIt(A, B, C, D);
    CreateIt(E);
    A->Size(2, 2);
    B->Size(A);
    C->Size(A);
    D->Size(A);
    E->Concat(2, 2, DewArray<TMtx*>{A, B,
        C, D});  // form one 4x4 matrix
    FreeIt(E);
    FreeIt(A, B, C, D);
}
See Also: TMtx::ConcatHorz, TMtx::ConcatVert
Declared in Dew::Math::TMtx · Dew.Math/MtxVec.h · Cross-compiler