MtxExpr.Mul Method

Overload List

#SignatureDescription
1function Mul(const Mtx1: TMtx; const Mtx2: TMtx): Matrix;Returns the matrix product of two matrices.
2function Mul(const Mtx1: TMtx; const Mtx2: TMtx; const Mtx3: TMtx): Matrix;Returns the matrix product of three matrices.
3function Mul(const Mtx1: TMtx; const Mtx2: TMtx; const Mtx3: TMtx; const Mtx4: TMtx): Matrix;Returns the matrix product of four matrices.
4function Mul(const Mtx1: TMtx; const Mtx2: TMtx; Operation1: TMtxOperation; Operation2: TMtxOperation): Matrix;Returns the matrix product of two matrices.
5function Mul(const Mtx1: TMtx; const Mtx2: TMtx; Mtx1Type: TMtxType; Mtx2Type: TMtxType; Operation1: TMtxOperation; Operation2: TMtxOperation): Matrix;Returns the matrix product of two matrices.
6function Mul(const Left: TMtx; const Right: TVec): Vector;Matrix vector multiply returning Vector type result.
7function Mul(const mtxArray: TMtxArray): Matrix;Returns the matrix product of multiple matrices.
8function Mul(const mtxArray: TMtxArray; const transpArray: TIntegerArray): Matrix;Returns the matrix product of multiple matrices.
9function Mul(const Left: TVec; const Right: TMtx): Vector;Vector matrix multiply returning Vector type result.
10function Mul(const Left: TVec; const Right: TVec): Matrix;Tensor product of two vectors returning Matrix type result.

Overload 1: function Mul(const Mtx1: TMtx; const Mtx2: TMtx): Matrix;

Returns the matrix product of two matrices.

#NameTypeDescription
1Mtx1TMtx
2Mtx2TMtx

Returns: Matrix

Remarks:

Internally calls Matrix.Mul and does JIT-ed (faster) multiply for small square matrices.

Examples
var  A,B,C: TMtx;
begin
    CreateIt(A,B,C);
    try
        A.SetIt(2,2,False,[1,2,
            2,4]);
        B.SetIt(2,2,False,[1,2,
            2,4]);
        C.Mul(A,B);
    finally
        FreeIt(A,B,C);
    end;
end;

Overload 2: function Mul(const Mtx1: TMtx; const Mtx2: TMtx; const Mtx3: TMtx): Matrix;

Returns the matrix product of three matrices.

#NameTypeDescription
1Mtx1TMtx
2Mtx2TMtx
3Mtx3TMtx

Returns: Matrix

Remarks:

Internally calls Matrix.Mul and does JIT-ed (faster) multiply for small square matrices.

Overload 3: function Mul(const Mtx1: TMtx; const Mtx2: TMtx; const Mtx3: TMtx; const Mtx4: TMtx): Matrix;

Returns the matrix product of four matrices.

#NameTypeDescription
1Mtx1TMtx
2Mtx2TMtx
3Mtx3TMtx
4Mtx4TMtx

Returns: Matrix

Remarks:

Internally calls Matrix.Mul and does JIT-ed (faster) multiply for small square matrices.

Overload 4: function Mul(const Mtx1: TMtx; const Mtx2: TMtx; Operation1: TMtxOperation; Operation2: TMtxOperation): Matrix;

Returns the matrix product of two matrices.

#NameTypeDescription
1Mtx1TMtx
2Mtx2TMtx
3Operation1TMtxOperation
4Operation2TMtxOperation

Returns: Matrix

Remarks:

Internally calls Matrix.Mul This operation is not JIT-ed.

Overload 5: function Mul(const Mtx1: TMtx; const Mtx2: TMtx; Mtx1Type: TMtxType; Mtx2Type: TMtxType; Operation1: TMtxOperation; Operation2: TMtxOperation): Matrix;

Returns the matrix product of two matrices.

#NameTypeDescription
1Mtx1TMtx
2Mtx2TMtx
3Mtx1TypeTMtxType
4Mtx2TypeTMtxType
5Operation1TMtxOperation
6Operation2TMtxOperation

Returns: Matrix

Remarks:

Internally calls Matrix.Mul This operation is not JIT-ed.

Overload 6: function Mul(const Left: TMtx; const Right: TVec): Vector;

Matrix vector multiply returning Vector type result.

#NameTypeDescription
1LeftTMtx
2RightTVec

Returns: Vector

Remarks:

Internally calls Vector.TensorProd

Overload 7: function Mul(const mtxArray: TMtxArray): Matrix;

Returns the matrix product of multiple matrices.

#NameTypeDescription
1mtxArrayTMtxArray

Returns: Matrix

Remarks:

Internally calls Matrix.Mul and does JIT-ed (faster) multiply for small square matrices.

var a,b,c,d,e: Matrix; begin
a := Mul([b,c,d,e]); end;

Overload 8: function Mul(const mtxArray: TMtxArray; const transpArray: TIntegerArray): Matrix;

Returns the matrix product of multiple matrices.

#NameTypeDescription
1mtxArrayTMtxArray
2transpArrayTIntegerArray

Returns: Matrix

Remarks:

Internally calls Matrix.Mul and will not use JIT-ed matrix multiply for small square matrices, if transpose is requested for the specified matrix. Both parameters need to be equal in length.

var a,b,c,d,e: Matrix; begin
a := Mul([b,c,d,e], [0,1,0,0]); // transpose c before multiplying end;

Overload 9: function Mul(const Left: TVec; const Right: TMtx): Vector;

Vector matrix multiply returning Vector type result.

#NameTypeDescription
1LeftTVec
2RightTMtx

Returns: Vector

Remarks:

Internally calls Vector.TensorProd

Overload 10: function Mul(const Left: TVec; const Right: TVec): Matrix;

Tensor product of two vectors returning Matrix type result.

#NameTypeDescription
1LeftTVec
2RightTVec

Returns: Matrix

Remarks:

Internally calls Vector.TensorProd