Matrix<common_value, common_allocator, void, common_policy> Chusov::Math::operator- | ( | const Matrix< val1_t, alloc1_t, der1_t, policy1_t > & | left, |
const Matrix< val2_t, alloc2_t, der2_t, policy2_t > & | right | ||
) |
Subtracts two matrices.
val1_t | is a type of an element of the left matrix. |
alloc1_t | is a type of an allocator used by the left operand. |
der1_t | is a derived type of the first operand. See Matrix::derived_type. |
policy1_t | is an execution policy of the first operand. |
val2_t | is a type of an element of the right matrix. |
alloc2_t | is a type of an allocator used by the right operand. It must match the first allocator so that std::is_same<alloc_1, std::allocator_traits<alloc2>::template rebind_alloc<val1_t>>::value;
|
der2_t | is a derived type of the second operand. See Matrix::derived_type. |
policy2_t | is an execution policy of the second operand. |
left | is a reference to the left operand. |
right | is a reference to the right operand. |
- A type of an element is determined by the [std::common_type](http://en.cppreference.com/w/cpp/types/common_type) metafunction. - A type of allocator is determined by the [std::allocator_traits<alloc1_t>::rebind_alloc](http://en.cppreference.com/w/cpp/memory/allocator_traits) for the resulting type of elements. - The implementing matrix type is \p void (i.e. the implementor of the result is the \re Matrix class). - An execution policy is determined by the \ref Chusov::Math::common_policy "common_policy" metafunction.
Chusov::Exceptions::InvalidParameterException | Dimensions of the matrices do not match. |