1 #ifndef STAN_MATH_PRIM_MAT_FUN_MULTIPLY_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_MULTIPLY_HPP
7 #include <boost/type_traits/is_arithmetic.hpp>
8 #include <boost/utility/enable_if.hpp>
22 template <
int R,
int C,
typename T>
24 typename boost::enable_if_c<boost::is_arithmetic<T>::value,
25 Eigen::Matrix<double, R, C> >::type
42 template <
int R,
int C,
typename T>
44 typename boost::enable_if_c<boost::is_arithmetic<T>::value,
45 Eigen::Matrix<double, R, C> >::type
47 const Eigen::Matrix<double, R, C>& m) {
61 template<
int R1,
int C1,
int R2,
int C2>
62 inline Eigen::Matrix<double, R1, C2>
63 multiply(
const Eigen::Matrix<double, R1, C1>& m1,
64 const Eigen::Matrix<double, R2, C2>& m2) {
80 template<
int C1,
int R2>
81 inline double multiply(
const Eigen::Matrix<double, 1, C1>& rv,
82 const Eigen::Matrix<double, R2, 1>& v) {
86 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.