22 #ifndef Rcpp__sugar__Comparator_With_One_Value_h
23 #define Rcpp__sugar__Comparator_With_One_Value_h
28 template <
int RTYPE,
typename Operator,
bool NA,
typename T>
38 m = Rcpp::traits::is_na<RTYPE>(
rhs) ?
45 return (this->*
m)(i) ;
59 return Rcpp::traits::is_na<RTYPE>(x) ? x :
op( x,
rhs ) ;
65 template <
int RTYPE,
typename Operator,
typename T>
67 public ::Rcpp::VectorBase< RTYPE, true, Comparator_With_One_Value<LGLSXP,Operator,false,T> > {
77 m = Rcpp::traits::is_na<RTYPE>(
rhs) ?
84 return (this->*
m)(i) ;
int operator[](R_xlen_t i) const
Comparator_With_One_Value(const VEC_TYPE &lhs_, STORAGE rhs_)
int rhs_is_not_na(int i) const
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, false, T > VEC_TYPE
int rhs_is_na(int i) const
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
int rhs_is_not_na(int i) const
int operator[](R_xlen_t i) const
traits::storage_type< RTYPE >::type STORAGE
Comparator_With_One_Value(const VEC_TYPE &lhs_, STORAGE rhs_)
int rhs_is_na(int i) const
int(Comparator_With_One_Value::* METHOD)(int) const