Stan Math Library  2.20.0
reverse mode automatic differentiation
sum.hpp
Go to the documentation of this file.
1 #ifndef STAN_MATH_PRIM_MAT_FUN_SUM_HPP
2 #define STAN_MATH_PRIM_MAT_FUN_SUM_HPP
3 
6 
7 namespace stan {
8 namespace math {
9 
18 template <typename Derived>
19 inline typename Eigen::DenseBase<Derived>::Scalar sum(
20  const Eigen::DenseBase<Derived>& v) {
21  return v.sum();
22 }
23 
24 } // namespace math
25 } // namespace stan
26 #endif
fvar< T > sum(const std::vector< fvar< T > > &m)
Return the sum of the entries of the specified standard vector.
Definition: sum.hpp:20

     [ Stan Home Page ] © 2011–2018, Stan Development Team.