23#ifndef Rcpp__sugar__cumsum_h
24#define Rcpp__sugar__cumsum_h
29template <
int RTYPE,
bool NA,
typename T>
30class Cumsum :
public Lazy< Rcpp::Vector<RTYPE> , Cumsum<RTYPE,NA,T> > {
39 R_xlen_t n =
object.
size() ;
45 for( R_xlen_t i=1; i<n; i++){
59template <
bool NA,
typename T>
64template <
bool NA,
typename T>
Cumsum(const VEC_TYPE &object_)
Rcpp::traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
Rcpp::Vector< RTYPE > VECTOR
storage_type< RTYPE >::type get_na()
bool is_na(typename storage_type< RTYPE >::type)
sugar::Cumsum< INTSXP, NA, T > cumsum(const VectorBase< INTSXP, NA, T > &t)
#define RCPP_SAFE_ADD(a, b)