Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TMtx Kron(TMtx SrcMtx1, TMtx SrcMtx2) | The Kronecker product between two matrices. |
| 2 | TMtx Kron(TVec Vec1, TVec Vec2) | The Kronecker product between two vectors. |
Overload 1: TMtx Kron(TMtx SrcMtx1, TMtx SrcMtx2)
The Kronecker product between two matrices.
Result: stored in self (calling object), returns self for chaining
Remarks:
Calculates the Kronecker product between SrcMtx1 and SrcMtx2 and stores the result in the calling matrix. The Dew.Math.TMtx.Rows, Dew.Math.TMtx.Cols and Dew.Math.TMtxVec.Complex properties of calling matrix are set automatically.
Overload 2: TMtx Kron(TVec Vec1, TVec Vec2)
The Kronecker product between two vectors.
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.TMtx.Rows, Dew.Math.TMtx.Cols and Dew.Math.TMtxVec.Complex properties of calling matrix are set automatically.
Examples
TMtx A;
TVec V1;
TVec V2;
MtxVec.CreateIt(out A);
MtxVec.CreateIt(out V1, out V2);
try
{
V1.SetIt(false,new double[] {1,2,3});
V2.SetIt(false,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