Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ check_multiplicable()

template<typename T1 , typename T2 >
void stan::math::check_multiplicable ( const char *  function,
const char *  name1,
const T1 &  y1,
const char *  name2,
const T2 &  y2 
)
inline

Check if the matrices can be multiplied.

This checks the runtime sizes to determine whether the two matrices are multiplicable. This allows Eigen matrices, vectors, and row vectors to be checked.

Template Parameters
T1Type of first matrix
T2Type of second matrix
Parameters
functionFunction name (for error messages)
name1Variable name for the first matrix (for error messages)
y1First matrix to test, requires class access to .rows() and .cols()
name2Variable name for the second matrix (for error messages)
y2Second matrix to test, requires class access to .rows() and .cols()
Exceptions
<code>std::invalid_argument</code>if the matrices are not multiplicable or if either matrix is size 0 for either rows or columns

Definition at line 30 of file check_multiplicable.hpp.