TVec *Kron(TVec *Vec1, TVec *Vec2);
The Kronecker product between two vectors.
Remarks:
Calculates the Kronecker product between vectors Vec1 and Vec2 and stores the results in calling vector.
Examples
#include "MtxVec.h"
#include "Units.MtxVec.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVec;
void Example()
{
TVec *a, *b, *c;
CreateIt(a, b, c);
a->SetIt(false, DewArray<double>{1, 2, 3, 4});
b->SetIt(false, DewArray<double>{1, 2, 3, 4});
c->Kron(a, b); // c = [1,2,3,4, 2,4,6,8, 3,6,9,12, 4,8,12,16]
FreeIt(a, b, c);
}
Declared in Dew::Math::TVec · Dew.Math/MtxVec.h · Cross-compiler