The scalar multiplication is the multiplication of vector or a matrix with a scalar value. Alternatively it is also possible to divide a vector or a matrix by a scalar value. In Blaze it is possible to use all built-in/fundamental data types except bool as scalar values. Additionally, it is possible to use std::complex
values with the same built-in data types as element type.
Efficient implementation of an arbitrary sized sparse vector.
Definition: CompressedVector.h:220
Efficient implementation of an arbitrary sized vector.
Definition: DynamicVector.h:223
Efficient implementation of a fixed-sized vector.
Definition: StaticVector.h:230
BLAZE_ALWAYS_INLINE constexpr decltype(auto) mult(T1 &&lhs, T2 &&rhs) noexcept(noexcept(lhs *rhs))
Multiplication of the two given arguments.
Definition: Mult.h:66
BLAZE_ALWAYS_INLINE constexpr decltype(auto) div(T1 &&lhs, T2 &&rhs) noexcept(noexcept(lhs/rhs))
Division of the two given arguments.
Definition: Div.h:66
Efficient implementation of a compressed matrix.
Definition: CompressedMatrix.h:239
Efficient implementation of a dynamic matrix.
Definition: DynamicMatrix.h:242
Efficient implementation of a fixed-sized matrix.
Definition: StaticMatrix.h:249
Vectors and matrices cannot be used for as scalar value for scalar multiplications or divisions (see the following example). However, each vector and matrix provides the scale()
function, which can be used to scale a vector or matrix element-wise with arbitrary scalar data types:
M1 * scalar;
M1.scale( scalar );
Previous: Subtraction Next: Componentwise Multiplication