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

◆ cumulative_sum() [4/5]

template<typename EigVec , require_eigen_vector_t< EigVec > * = nullptr, require_not_st_var< EigVec > * = nullptr>
auto stan::math::cumulative_sum ( const EigVec &  m)
inline

Return the cumulative sum of the specified vector.

The cumulative sum is of the same type as the input and has values defined by

x(0), x(1) + x(2), ..., x(1) + , ..., + x(x.size()-1)
Template Parameters
EigVectype of the vector (must be derived from Eigen::MatrixBase and have one compile time dimension equal to 1)
Parameters
mVector of values.
Returns
Cumulative sum of values.

Definition at line 50 of file cumulative_sum.hpp.