1#ifndef STAN_MATH_PRIM_FUN_PROD_HPP
2#define STAN_MATH_PRIM_FUN_PROD_HPP
18template <
typename T, require_stan_scalar_t<T>* =
nullptr>
32inline T
prod(
const std::vector<T>& v) {
36 Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, 1>> m(&v[0], v.size());
48template <
typename EigMat, require_eigen_t<EigMat>* =
nullptr>
typename value_type< T >::type value_type_t
Helper function for accessing underlying type.
value_type_t< T > prod(const T &m)
Calculates product of given kernel generator expression elements.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...