1 #ifndef STAN_MATH_PRIM_MAT_FUN_ROWS_DOT_PRODUCT_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_ROWS_DOT_PRODUCT_HPP 19 template <
int R1,
int C1,
int R2,
int C2>
21 const Eigen::Matrix<double, R1, C1>& v1,
22 const Eigen::Matrix<double, R2, C2>& v2) {
24 return (v1.cwiseProduct(v2)).rowwise().sum();
void check_matching_sizes(const char *function, const char *name1, const T_y1 &y1, const char *name2, const T_y2 &y2)
Check if two structures at the same size.
Eigen::Matrix< fvar< T >, R1, 1 > rows_dot_product(const Eigen::Matrix< fvar< T >, R1, C1 > &v1, const Eigen::Matrix< fvar< T >, R2, C2 > &v2)