TMtxInt::Kron Method

TMtxInt *Kron(TVecInt *Vec1, TVecInt *Vec2);

The Kronecker product between two vectors.

#NameTypeDescription
1Vec1TVecInt *
2Vec2TVecInt *
Remarks:

Calculates the Kronecker product between Vec1 and Vec2 and stores the result in the calling matrix. The TMtxInt::Rows, TMtxInt::Cols and TMtxInt::IntPrecision properties of calling matrix are set automatically.

Examples
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;

void Example()
{
    TMtxInt* A;
    TVecInt *V1, *V2;

    CreateIt(A);
    CreateIt(V1, V2);
    V1->SetIt(DewArray<int>{1, 2, 3});
    V2->SetIt(DewArray<int>{4, 5, 6});
    A->Kron(V1, V2);
    // A becomes:
    // [4   5  6]
    // [8  10 12]
    // [12 15 18]
    FreeIt(A);
    FreeIt(V1, V2);
}
See Also: TVec::Kron
Declared in Dew::Math::TMtxInt · Dew.Math/MtxVecInt.h · Cross-compiler