Matrix::Mul Method

Overload List

#SignatureDescription
1TMtxVec *Mul(const double Value) const;Multiply object elements with Value.
2TMtxVec *Mul(const TCplx &Value) const;Multiply all calling object elements with complex Value in-place.
3TMtxVec *Mul(const double Value, int Index, int Len) const;Multipy calling object elements [Index]..[Index+Len-1] with Value in-place.
4TMtxVec *Mul(const TCplx &Value, int Index, int Len) const;Multipy calling object elements [Index]..[Index+Len-1] with complex Value in-place.
5TMtxVec *Mul(TMtxVec *Vec, double Value) const;Multiply each element of Vec with Value and store the result in the calling object.
6TMtxVec *Mul(TMtxVec *Vec, TCplx Value) const;Multiply each element of Vec with complex Value and store the result in the calling object.
7TMtxVec *Mul(TMtxVec *Vec, double Value, int VecIndex, int Index, int Len) const;Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with Value and store the result in calling object elements [Index]..[Index+Len-1].
8TMtxVec *Mul(TMtxVec *Vec, TCplx Value, int VecIndex, int Index, int Len) const;Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with complex Value and store the result in calling object elements [Index]..[Index+Len-1].
9TMtxVec *Mul(TMtxVec *Vec) const;Matrix multiplication.
10TMtxVec *Mul(TMtxVec *Vec, int VecIndex, int Index, int Len) const;Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with calling object elements [Index]..[Index+Len-1] in-place.
11TMtxVec *Mul(TMtxVec *Vec1, TMtxVec *Vec2, int Vec1Index, int Vec2Index, int Index, int Len) const;Multiply Vec1 elements [Vec1Index]..[Vec1Index+Len-1] with Vec2 object elements [Vec2Index]..[Vec2Index+Len-1] and store the results in calling object elements [Index]..[Index+Len-1].
12TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2) const;Matrix multiplication.
13TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtxOperation Operation1, TMtxOperation Operation2 = TMtxOperation::opNone) const;Left side multiply Mtx2 with Mtx1 matrix and store the results in the calling matrix.
14TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtxType Mtx1Type, TMtxType Mtx2Type = TMtxType::mtGeneral, TMtxOperation Operation1 = TMtxOperation::opNone, TMtxOperation Operation2 = TMtxOperation::opNone) const;Left side multiply Mtx2 with Mtx1 matrix and store the results in the calling matrix. If parameters Mtx1Type and/or Mtx2Type are specified, the optimized multiplication method will be used.
15TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtx *Mtx3) const;Returns the matrix product of three matrices.
16TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtx *Mtx3, TMtx *Mtx4) const;Returns the matrix product of four matrices.

Overload 1: TMtxVec *Mul(const double Value) const;

Multiply object elements with Value.

#NameTypeDescription
1Valueconst double
Remarks:

Multiply all calling object elements with Value in-place.

See Also: Matrix::Add
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 2: TMtxVec *Mul(const TCplx &Value) const;

Multiply all calling object elements with complex Value in-place.

#NameTypeDescription
1Valueconst TCplx &
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 3: TMtxVec *Mul(const double Value, int Index, int Len) const;

Multipy calling object elements [Index]..[Index+Len-1] with Value in-place.

#NameTypeDescription
1Valueconst double
2Indexint
3Lenint
Remarks:

An exception is raised if array borders are overrun or underrun.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 4: TMtxVec *Mul(const TCplx &Value, int Index, int Len) const;

Multipy calling object elements [Index]..[Index+Len-1] with complex Value in-place.

#NameTypeDescription
1Valueconst TCplx &
2Indexint
3Lenint
Remarks:

An exception is raised if array borders are overrun or underrun.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 5: TMtxVec *Mul(TMtxVec *Vec, double Value) const;

Multiply each element of Vec with Value and store the result in the calling object.

#NameTypeDescription
1VecTMtxVec *
2Valuedouble
Remarks:

Size and Matrix::Complex properties of the calling object are adjusted automatically.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 6: TMtxVec *Mul(TMtxVec *Vec, TCplx Value) const;

Multiply each element of Vec with complex Value and store the result in the calling object.

#NameTypeDescription
1VecTMtxVec *
2ValueTCplx
Remarks:

Size of the calling object is set automatically. Matrix::Complex property of the calling object is set to True.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 7: TMtxVec *Mul(TMtxVec *Vec, double Value, int VecIndex, int Index, int Len) const;

Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with Value and store the result in calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1VecTMtxVec *
2Valuedouble
3VecIndexint
4Indexint
5Lenint
Remarks:

Size of the calling object is not changed. An exception is raised if array borders are overrun or underrun. Matrix::Complex propertiy of the calling object is set implicitly.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 8: TMtxVec *Mul(TMtxVec *Vec, TCplx Value, int VecIndex, int Index, int Len) const;

Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with complex Value and store the result in calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1VecTMtxVec *
2ValueTCplx
3VecIndexint
4Indexint
5Lenint
Remarks:

Size of the calling object is not changed. An exception is raised if array borders are overrun or underrun. Matrix::Complex propertiy of the calling object is set to True.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 9: TMtxVec *Mul(TMtxVec *Vec) const;

Matrix multiplication.

#NameTypeDescription
1VecTMtxVec *
Remarks:

Multiply each of Vec elements with corresponding elements in the calling object. Size and Matrix::Complex property of the calling object are set automatically. The result is stored in the calling object.

See Also: Matrix::Divide
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 10: TMtxVec *Mul(TMtxVec *Vec, int VecIndex, int Index, int Len) const;

Multiply Vec elements [VecIndex]..[VecIndex+Len-1] with calling object elements [Index]..[Index+Len-1] in-place.

#NameTypeDescription
1VecTMtxVec *
2VecIndexint
3Indexint
4Lenint
Remarks:

An exception is raised if Vec and calling object Matrix::Complex property do not match or if array borders are overrun/underrun.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 11: TMtxVec *Mul(TMtxVec *Vec1, TMtxVec *Vec2, int Vec1Index, int Vec2Index, int Index, int Len) const;

Multiply Vec1 elements [Vec1Index]..[Vec1Index+Len-1] with Vec2 object elements [Vec2Index]..[Vec2Index+Len-1] and store the results in calling object elements [Index]..[Index+Len-1].

#NameTypeDescription
1Vec1TMtxVec *
2Vec2TMtxVec *
3Vec1Indexint
4Vec2Indexint
5Indexint
6Lenint
Remarks:

Size and Matrix::Complex properties of the calling object must be set explicitly. An exception is raised if Matrix::ConditionCheck is True and array borders are overrun or underrun.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 12: TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2) const;

Matrix multiplication.

#NameTypeDescription
1Mtx1TMtx *
2Mtx2TMtx *
Remarks:

Performs matrix multiplication, which is JIT-ed (faster) up to size 64 for square matrices. In most general case the matrix multiplication is defined by the following equation (result = calling matrix):

result=αop(M1)op(M2)+βresult\text{result}=\alpha \cdot \text{op}(M_1) \cdot \text{op}(M_2) + \beta \cdot \text{result}

where a and b are and variables. The default values for a and b are Cplx(1,0) and Cplx(0,0), so the above equation is reduced to:

result=op(M1)op(M2)\text{result}=\text{op}(M_1)\cdot \text{op}(M_2)

The Operation1 and Operation2 indicate additional TMtxOperation, performed on Mtx1 and Mtx2 respectively. Default value for operation is opNone (no additional operation). The Mtx1Type and Mtx2Type parameters indicate the TMtxType of Mtx1 and Mtx2 matrices. Depending what type of matrices you are multiplying, the Mul method will choose most optimized multiplication method. So, choosing the correct values for Mtx1Type and Mtx2Type can significantly speed up the multiplication. This overloaded function performs a left side multiply operation Mtx2 with Mtx1 matrix and stores the results in the calling matrix. If Operation1 and/or Operation2 parameters are specified, perform additional operation on Mtx1 or Mtx2. If Operation1 and/or Operation2 parameters are omitted, the default values (no operation) will be used. The Matrix::Rows, Matrix::Cols and Matrix::Complex properties of the calling matrix are adjusted automatically. An exception is raised is Mtx1 Cols property does not match the Mtx2 Rows property (matrix multiplication is not possible). An exception is raised, if Matrix::Complex property of Mtx1 and Mtx2 does not match.

Notes
1. NOTE: If you are not sure, which TMtxType of matrix are you multiplying, you can use the mtGeneral type (general case). You can also use the Matrix::DetectMtxType method to determine the type of matrix. 2. The routine is multithreaded, if specified by the environment variable.

See Also: Matrix::MulElem
Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 13: TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtxOperation Operation1, TMtxOperation Operation2 = TMtxOperation::opNone) const;

Left side multiply Mtx2 with Mtx1 matrix and store the results in the calling matrix.

#NameTypeDescription
1Mtx1TMtx *
2Mtx2TMtx *
3Operation1TMtxOperation
4Operation2 = TMtxOperation::opNoneTMtxOperation
Remarks:

If Operation1 and/or Operation2 parameters are specified, perform additional operation on Mtx1 or Mtx2. If Operation1 and/or Operation2 parameters are omitted, the default values (no operation) will be used. The Matrix::Rows, Matrix::Cols and Matrix::Complex properties of the calling matrix are adjusted automatically. An exception is raised is Mtx1 Cols property does not match the Mtx2 Rows property (matrix multiplication is not possible). An exception is raised, if Complex property of Mtx1 and Mtx2 does not match.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 14: TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtxType Mtx1Type, TMtxType Mtx2Type = TMtxType::mtGeneral, TMtxOperation Operation1 = TMtxOperation::opNone, TMtxOperation Operation2 = TMtxOperation::opNone) const;

Left side multiply Mtx2 with Mtx1 matrix and store the results in the calling matrix. If parameters Mtx1Type and/or Mtx2Type are specified, the optimized multiplication method will be used.

#NameTypeDescription
1Mtx1TMtx *
2Mtx2TMtx *
3Mtx1TypeTMtxType
4Mtx2Type = TMtxType::mtGeneralTMtxType
5Operation1 = TMtxOperation::opNoneTMtxOperation
6Operation2 = TMtxOperation::opNoneTMtxOperation
Remarks:

If parameters Mtx1Type and/or Mtx2Type are omitted, default values (general matrix) will be used. If Operation1 and/or Operation2 parameters are specified, perform additional operation on Mtx1 or Mtx2. If Operation1 and/or Operation2 parameters are omitted, the default values (no operation) will be used. The Matrix::Rows, Matrix::Cols and Matrix::Complex properties of the calling matrix are adjusted automatically. An exception is raised is Mtx1 Cols property does not match the Mtx2 Rows property (matrix multiplication is not possible). An exception is raised, if Complex property of Mtx1 and Mtx2 does not match.

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 15: TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtx *Mtx3) const;

Returns the matrix product of three matrices.

#NameTypeDescription
1Mtx1TMtx *
2Mtx2TMtx *
3Mtx3TMtx *
Remarks:

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

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler

Overload 16: TMtx *Mul(TMtx *Mtx1, TMtx *Mtx2, TMtx *Mtx3, TMtx *Mtx4) const;

Returns the matrix product of four matrices.

#NameTypeDescription
1Mtx1TMtx *
2Mtx2TMtx *
3Mtx3TMtx *
4Mtx4TMtx *
Remarks:

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

Declared in Dew::Math::Matrix · Dew.Math/MtxExpr.h · Cross-compiler