Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ cumulative_sum() [3/5]

template<typename T >
std::vector< T > stan::math::cumulative_sum ( const std::vector< T > &  x)
inline

Return the cumulative sum of the specified vector.

The cumulative sum of a vector of values

is the
\code x[0], x[1] + x[2], ..., x[1] + , ..., + x[x.size()-1]
Template Parameters
Ttype of elements in the vector
Parameters
xVector of values.
Returns
Cumulative sum of values.

Definition at line 25 of file cumulative_sum.hpp.