22 #ifndef Rcpp__sugar__Comparator_h
23 #define Rcpp__sugar__Comparator_h
28 template <
int RTYPE,
typename Operator,
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
30 public ::Rcpp::VectorBase< LGLSXP, true, Comparator<RTYPE,Operator,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
42 if( Rcpp::traits::is_na<RTYPE>( x ) )
return NA_LOGICAL ;
44 if( Rcpp::traits::is_na<RTYPE>( y ) )
return NA_LOGICAL ;
59 template <
int RTYPE,
typename Operator,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
60 class Comparator<RTYPE,Operator,false,LHS_T,RHS_NA,RHS_T> :
61 public ::Rcpp::VectorBase< LGLSXP, true, Comparator<RTYPE,Operator,false,LHS_T,RHS_NA,RHS_T> > {
73 if( Rcpp::traits::is_na<RTYPE>( y ) )
return NA_LOGICAL ;
74 return op(
lhs[i], y ) ;
87 template <
int RTYPE,
typename Operator,
typename LHS_T,
typename RHS_T>
88 class Comparator<RTYPE,Operator,false,LHS_T,false,RHS_T> :
89 public ::Rcpp::VectorBase< LGLSXP, true, Comparator<RTYPE,Operator,false,LHS_T,false,RHS_T> > {
Rcpp::VectorBase< RTYPE, RHS_NA, RHS_T > RHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, false, LHS_T > LHS_TYPE
int operator[](R_xlen_t i) const
Comparator(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< RTYPE, false, RHS_T > RHS_TYPE
int operator[](R_xlen_t i) const
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, false, LHS_T > LHS_TYPE
Comparator(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, LHS_NA, LHS_T > LHS_TYPE
Comparator(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
int operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE, RHS_NA, RHS_T > RHS_TYPE