MatrixInt.Kron Method

TMtxInt Kron(TVecInt Vec1, TVecInt Vec2)

The Kronecker product between two vectors.

#NameTypeDescription
1Vec1TVecIntsource TVecInt
2Vec2TVecIntsource TVecInt

Result: stored in self (calling object), returns self for chaining

Remarks:

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

Examples
TMtxInt A;
TVecInt V1;
TVecInt V2;
MtxVec.CreateIt(out A);
MtxVec.CreateIt(out V1, out V2);
try
    {
        V1.SetIt(new double[] {1,2,3});
        V2.SetIt(new double[] {4,5,6});
        A.Kron(V1,V2);
        // A becomes:
        // [4   5  6]
        // [8  10 12]
        // [12 15 18]
    }
finally
    {
        MtxVec.FreeIt(ref A);
        MtxVec.FreeIt(ref V1, ref V2);
    }
See Also: TVec.Kron