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
-
T1 | Type of first matrix |
T2 | Type of second matrix |
- Parameters
-
function | Function name (for error messages) |
name1 | Variable name for the first matrix (for error messages) |
y1 | First matrix to test, requires class access to .rows() and .cols() |
name2 | Variable name for the second matrix (for error messages) |
y2 | Second 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.