1 #ifndef STAN__MATH__MATRIX__MULTIPLY_HPP
2 #define STAN__MATH__MATRIX__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>
multiply(
const Eigen::Matrix<double,R1,C1>& m1,
62 const Eigen::Matrix<double,R2,C2>& m2) {
78 template<
int C1,
int R2>
79 inline double multiply(
const Eigen::Matrix<double,1,C1>& rv,
80 const Eigen::Matrix<double,R2,1>& v) {
83 if (rv.size() != v.size())
84 throw std::domain_error(
"rv.size() != v.size()");
bool check_multiplicable(const char *function, const T1 &y1, const char *name1, const T2 &y2, const char *name2, T_result *result)
bool check_matching_sizes(const char *function, const T_y1 &y1, const char *name1, const T_y2 &y2, const char *name2, T_result *result)
boost::enable_if_c< boost::is_arithmetic< T >::value, Eigen::Matrix< double, R, C > >::type multiply(const Eigen::Matrix< double, R, C > &m, T c)
Return specified matrix multiplied by specified scalar.