TMtxInt *TensorProd(TVecInt *Vec1, TVecInt *Vec2);
Calculates the tensor product of two vectors.
Remarks:
Calculates the tensor product of Vec1 and Vec2 vectors and stores the results in the calling matrix. The TMtxSmallInt::Rows property is set to Vec1.TMtxSmallInt::Length and TMtxSmallInt::Cols property is set to Vec2.TMtxSmallInt::Length. The TMtxSmallInt::IntPrecision property of the calling matrix is adjusted automatically.
Examples
#include "MtxVecInt.h"
#include "Units.MtxVecInt.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::MtxVecInt;
void Example()
{
TVecInt *Vec1, *Vec2;
TMtxInt* V;
CreateIt(Vec1, Vec2);
CreateIt(V);
Vec1->Size(3);
Vec1->SetIt(DewArray<int>{0,2,3});
Vec2->Copy(Vec1);
V->TensorProd(Vec1, Vec2);
// V becomes:
// [0,0,0]
// [0,4,6]
// [0,6,9]
FreeIt(Vec1, Vec2);
FreeIt(V);
}
Declared in Dew::Math::TMtxInt · Dew.Math/MtxVecInt.h · Cross-compiler