1 #ifndef __STAN__MATH__MATRIX__ELT_MULTIPLY_HPP__
2 #define __STAN__MATH__MATRIX__ELT_MULTIPLY_HPP__
4 #include <boost/math/tools/promotion.hpp>
23 template <
typename T1,
typename T2,
int R,
int C>
24 Eigen::Matrix<typename boost::math::tools::promote_args<T1,T2>::type, R, C>
26 const Eigen::Matrix<T2,R,C>& m2) {
28 Eigen::Matrix<typename boost::math::tools::promote_args<T1,T2>::type, R, C>
29 result(m1.rows(),m2.cols());
30 for (
int i = 0; i < m1.size(); ++i)
31 result(i) = m1(i) * m2(i);