Stan Math Library
2.6.3
probability, sampling & optimization
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerator
Friends
Macros
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
#include <vector>
7
8
namespace
stan {
9
namespace
math {
10
21
template
<
typename
T,
int
R,
int
C>
22
inline
double
sum
(
const
Eigen::Matrix<T, R, C>& v) {
23
return
v.sum();
24
}
25
26
}
27
}
28
#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
sum.hpp
Eigen.hpp
[
Stan Home Page
]
© 2011–2015, Stan Development Team.