chsvlib
chsv helper source code

◆ operator*() [2/3]

Matrix<common_type, typename std::allocator_traits<alloc_t>::template rebind_alloc<common_type>, void, policy_t> Chusov::Math::operator* ( const Matrix< val_t, alloc_t, der_t, policy_t > &  left,
elem_t &&  val 
)

Multiplies a matrix and a scalar.

Template Parameters
val_tis a type of an element of the matrix.
alloc_tis a type of an allocator used by the matrix.
der_tis a derived type of the matrix. See Matrix::derived_type.
policy_tis an execution policy of the matrix.
elem_tis a type of the scalar multiplied to the matrix.
Parameters
leftis a reference to the matrix.
valis the scalar multiplied to the matrix from the right.
Returns
A new matrix which is a product of the operands. A type of elements of the resulting matrix is determined by the std::common_type metafunction.
Remarks
The operation is defined only when a common type of the resulting matrix meets the requirements of the Rng concept.