Prototypes | Header File(s) | |
template <class T> | ||
RWGenMat<T> |
product(const RWGenMat<T> A, const RWGenMat<T>& B) |
<rw/math/genmat.h> |
RWMathVec<T> |
product(const RWGenMat<T> A, const RWMathVec<T>& v) |
<rw/math/genmat.h> <rw/math/mathvec.h> |
Returns the inner product of its two arguments. The version that takes two matrices A and B returns:
The function checks to make sure that the number of columns in A equals the number of rows in B. Otherwise, an exception with value MATX_MATMATPROD occurs.
The version that takes a matrix A and a vector v as arguments returns:
The function checks to make sure that the number of columns in A equals the number of elements in v. Otherwise, an exception with value MATX_MATVECPROD occurs.