1 #ifndef STAN_MATH_PRIM_MAT_FUN_MULTIPLY_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_MULTIPLY_HPP
4 #include <boost/type_traits/is_arithmetic.hpp>
5 #include <boost/utility/enable_if.hpp>
21 template <
int R,
int C,
typename T>
23 typename boost::enable_if_c<boost::is_arithmetic<T>::value,
24 Eigen::Matrix<double, R, C> >::type
41 template <
int R,
int C,
typename T>
43 typename boost::enable_if_c<boost::is_arithmetic<T>::value,
44 Eigen::Matrix<double, R, C> >::type
46 const Eigen::Matrix<double, R, C>& m) {
60 template<
int R1,
int C1,
int R2,
int C2>
61 inline Eigen::Matrix<double, R1, C2>
62 multiply(
const Eigen::Matrix<double, R1, C1>& m1,
63 const Eigen::Matrix<double, R2, C2>& m2) {
79 template<
int C1,
int R2>
80 inline double multiply(
const Eigen::Matrix<double, 1, C1>& rv,
81 const Eigen::Matrix<double, R2, 1>& v) {
85 if (rv.size() != v.size())
Eigen::Matrix< fvar< T >, R1, C1 > multiply(const Eigen::Matrix< fvar< T >, R1, C1 > &m, const fvar< T > &c)
bool check_multiplicable(const char *function, const char *name1, const T1 &y1, const char *name2, const T2 &y2)
Return true if the matrices can be multiplied.
bool check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Return true if two structures at the same size.
void domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.