22 #ifndef Rcpp__sugar__diff_h
23 #define Rcpp__sugar__diff_h
31 template <
int RTYPE,
bool LHS_NA,
typename LHS_T>
50 if(
was_na || traits::is_na<RTYPE>(y) ) {
52 return traits::get_na<RTYPE>() ;
74 template <
typename LHS_T,
bool LHS_NA>
75 class Diff<REALSXP, LHS_NA, LHS_T> :
public Rcpp::VectorBase< REALSXP, LHS_NA, Diff<REALSXP,LHS_NA,LHS_T> >{
97 template <
int RTYPE,
typename LHS_T>
123 template <
bool LHS_NA,
typename LHS_T>
130 template <
bool LHS_NA,
typename LHS_T>
Diff(const LHS_TYPE &lhs_)
Rcpp::VectorBase< REALSXP, LHS_NA, LHS_T > LHS_TYPE
double operator[](R_xlen_t i) const
Diff(const LHS_TYPE &lhs_)
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE, false, LHS_T > LHS_TYPE
Rcpp::traits::storage_type< RTYPE >::type STORAGE
STORAGE operator[](R_xlen_t i) const
void set_previous(R_xlen_t i, STORAGE value) const
Rcpp::VectorBase< RTYPE, LHS_NA, LHS_T > LHS_TYPE
Diff(const LHS_TYPE &lhs_)
Rcpp::traits::storage_type< RTYPE >::type STORAGE
sugar::IsNa< RTYPE, NA, T > is_na(const Rcpp::VectorBase< RTYPE, NA, T > &t)
sugar::Diff< INTSXP, LHS_NA, LHS_T > diff(const VectorBase< INTSXP, LHS_NA, LHS_T > &lhs)