22 #ifndef Rcpp__sugar__cummin_h
23 #define Rcpp__sugar__cummin_h
28 template <
int RTYPE,
bool NA,
typename T>
29 class Cummin :
public Lazy< Rcpp::Vector<RTYPE>, Cummin<RTYPE, NA, T> > {
38 R_xlen_t n =
object.
size();
42 if (Rcpp::traits::is_na<RTYPE>(current))
return result;
44 for (R_xlen_t i = 1; i < n; i++) {
46 if (Rcpp::traits::is_na<RTYPE>(current))
return result;
58 template <
bool NA,
typename T>
63 template <
bool NA,
typename T>
Rcpp::traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
Rcpp::Vector< RTYPE > VECTOR
Cummin(const VEC_TYPE &object_)
sugar::Cummin< INTSXP, NA, T > cummin(const VectorBase< INTSXP, NA, T > &t)