function TensorProd(const MtxCol: TVec; const MtxRow: TVec): TMtx;
Calculates the tensor product of two vectors.
Result: stored in self (calling object), returns self for chaining
Remarks:
Calculates the tensor product of mtxCol and mtxRow vectors and stores the results in the calling matrix. The Matrix.Rows property is set to mtxCol.TMtxVecBase.Length and Matrix.Cols property is set to mtxRow.TMtxVecBase.Length. The TMtxVec.Complex property of the calling matrix is adjusted automatically.
Examples
var mtxCol,mtxRow: TVec;
V: TMtx;
begin
CreateIt(mtxCol,mtxRow);
CreateIt(V);
try
mtxCol.Size(3);
mtxCol.SetIt(false,[0,2,3]
mtxRow.Copy(mtxCol);
V.TensorProd(mtxCol,mtxRow);
// V becomes:
// [0,0,0]
// [0,4,6]
// [0,6,9]
finally
FreeIt(mtxCol,mtxRow);
FreeIt(V);
end;
end;
See Also: Matrix.AddTensorProd