22#ifndef Rcpp__sugar__sign_h
23#define Rcpp__sugar__sign_h
28template <
bool NA,
int RTYPE>
42 return ( x > 0 ? 1 : (x==0 ? 0 : -1) ) ;
47template <
int RTYPE,
bool NA,
typename T>
59 inline R_xlen_t
size()
const {
return object.size() ; }
61 operator SEXP()
const {
return wrap( *
this ); }
69template <
bool NA,
typename T>
74template <
bool NA,
typename T>
int operator[](R_xlen_t i) const
int get(R_xlen_t i) const
Sign(const VEC_TYPE &object_)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
Rcpp::traits::storage_type< RTYPE >::type STORAGE
Rcpp::traits::storage_type< RTYPE >::type STORAGE
static int get(STORAGE x)
Rcpp::traits::storage_type< RTYPE >::type STORAGE
static int get(STORAGE x)
bool is_na(typename storage_type< RTYPE >::type)
sugar::Sign< INTSXP, NA, T > sign(const VectorBase< INTSXP, NA, T > &t)
SEXP wrap(const Date &date)