1 #ifndef STAN__MATH__MATRIX__COLUMNS_DOT_PRODUCT_HPP
2 #define STAN__MATH__MATRIX__COLUMNS_DOT_PRODUCT_HPP
20 template<
int R1,
int C1,
int R2,
int C2>
21 inline Eigen::Matrix<double, 1, C1>
23 const Eigen::Matrix<double, R2, C2>& v2) {
26 Eigen::Matrix<double, 1, C1> ret(1,v1.cols());
27 for (
size_type j = 0; j < v1.cols(); ++j) {
28 ret(j) = v1.col(j).dot(v2.col(j));
Eigen::Matrix< double, 1, C1 > columns_dot_product(const Eigen::Matrix< double, R1, C1 > &v1, const Eigen::Matrix< double, R2, C2 > &v2)
Returns the dot product of the specified vectors.
index_type< Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > >::type size_type
Type for sizes and indexes in an Eigen matrix with double e.
bool check_matching_sizes(const char *function, const T_y1 &y1, const char *name1, const T_y2 &y2, const char *name2, T_result *result)