Multiplying two vectors with the same transpose flag (i.e. either blaze::columnVector or blaze::rowVector) via the multiplication operator results in a componentwise multiplication of the two vectors:
decltype(auto) trans(const DenseMatrix< MT, SO > &dm)
Calculation of the transpose of the given dense matrix.
Definition DMatTransExpr.h:766
Alternatively, either the inner() function, the dot() function or the comma operator can be used for any combination of vectors (row or column vectors) to perform an inner product:
Scalar product (dot/inner product) of two vectors ( ).
Definition Vector.h:283
When using the comma operator, please note the brackets embracing the inner product expression. Due to the low precedence of the comma operator (lower even than the assignment operator) these brackets are strictly required for a correct evaluation of the inner product.
Outer Product
The multiplication between a column vector and a row vector results in the outer product of the two vectors:
Two vectors with the same transpose flag can be multiplied via the cross product. The cross product between two vectors and is defined as
Due to the absence of a operator in the C++ language, the cross product is realized via the cross() function. Alternatively, the modulo operator (i.e. operator%) can be used in case infix notation is required:
Both dense and sparse vectors can be used for a Kronecker product. It is possible to multiply two vectors with different element type, as long as the element types themselves can be multiplied.