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

◆ cumulative_sum() [1/5]

template<typename T_vec , require_all_kernel_expressions_and_none_scalar_t< T_vec > * = nullptr>
auto stan::math::cumulative_sum ( T_vec &&  v)
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 the vector
Parameters
vVector of values.
Returns
Cumulative sum of values.

Definition at line 25 of file cumulative_sum.hpp.