Stan Math Library
2.20.0
reverse mode automatic differentiation
stan
math
prim
mat
fun
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
4
#include <
stan/math/prim/mat/fun/Eigen.hpp
>
5
#include <
stan/math/prim/arr/fun/sum.hpp
>
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
stan::math::sum
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
Definition:
log_sum_exp.hpp:8
sum.hpp
Eigen.hpp
[
Stan Home Page
]
© 2011–2018, Stan Development Team.