1 #ifndef STAN_MATH_PRIM_MAT_FUN_PROD_HPP 2 #define STAN_MATH_PRIM_MAT_FUN_PROD_HPP 17 inline T
prod(
const std::vector<T>& v) {
18 if (v.size() == 0)
return 1;
20 for (
size_t i = 1; i < v.size(); ++i)
31 template <
typename T,
int R,
int C>
32 inline T
prod(
const Eigen::Matrix<T, R, C>& v) {
33 if (v.size() == 0)
return 1.0;
T prod(const std::vector< T > &v)
Returns the product of the coefficients of the specified standard vector.