22#ifndef Rcpp__sugar__plus_h
23#define Rcpp__sugar__plus_h
28 template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
43 if( traits::is_na<RTYPE>(
lhs_) )
return lhs_ ;
58 template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
60 public Rcpp::VectorBase<REALSXP, true , Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
86 template <
int RTYPE,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
87 class Plus_Vector_Vector<RTYPE,
false,
LHS_T,
RHS_NA,
RHS_T> :
public Rcpp::VectorBase<RTYPE,true, Plus_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> > {
101 if( traits::is_na<RTYPE>(
rhs_) )
return rhs_ ;
112 template <
typename LHS_T,
bool RHS_NA,
typename RHS_T >
114 public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> > {
139 template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
typename RHS_T >
140 class Plus_Vector_Vector<RTYPE,
LHS_NA,
LHS_T,
false,
RHS_T> :
public Rcpp::VectorBase<RTYPE, true , Plus_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> > {
154 if( traits::is_na<RTYPE>(
lhs_) )
return lhs_ ;
165 template <
bool LHS_NA,
typename LHS_T,
typename RHS_T >
167 public Rcpp::VectorBase<REALSXP, true , Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> > {
193 template <
int RTYPE,
typename LHS_T,
typename RHS_T >
194 class Plus_Vector_Vector<RTYPE,
false,
LHS_T,
false,
RHS_T> :
public Rcpp::VectorBase<RTYPE, false , Plus_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> > {
217 template <
typename LHS_T,
typename RHS_T >
219 public Rcpp::VectorBase<REALSXP, false , Plus_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> > {
247 template <
int RTYPE,
bool NA,
typename T>
263 return Rcpp::traits::is_na<RTYPE>(x) ? x : (x +
rhs) ;
275 template <
bool NA,
typename T>
277 public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Primitive<REALSXP,NA,T> > {
299 template <
int RTYPE,
typename T>
322 template <
typename T>
324 public Rcpp::VectorBase<REALSXP,false, Plus_Vector_Primitive<REALSXP,false,T> > {
350 template <
int RTYPE,
bool NA,
typename T>
363 return Rcpp::traits::is_na<RTYPE>(x) ? x : (x +
rhs) ;
373 template <
bool NA,
typename T>
375 public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Primitive_nona<REALSXP,NA,T> > {
398 template <
int RTYPE,
typename T>
421 template <
typename T>
423 public Rcpp::VectorBase<REALSXP,false, Plus_Vector_Primitive_nona<REALSXP,false,T> > {
446template <
int RTYPE,
bool NA,
typename T,
typename U>
456template <
int RTYPE,
bool NA,
typename T,
typename U>
457inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type,
typename traits::storage_type<RTYPE>::type>::value,
typename sugar::Plus_Vector_Primitive< RTYPE , NA , T> >::type
467template <
int RTYPE,
bool NA,
typename T,
typename U>
468inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type,
typename traits::storage_type<RTYPE>::type>::value, sugar::Plus_Vector_Primitive_nona<RTYPE,NA,T> >::type
476template <
int RTYPE,
bool NA,
typename T,
typename U>
477inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type,
typename traits::storage_type<RTYPE>::type>::value, sugar::Plus_Vector_Primitive_nona< RTYPE , NA , T> >::type
486template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
487inline sugar::Plus_Vector_Vector<
Plus_Vector_Vector< RTYPE, LHS_NA, LHS_T, RHS_NA, RHS_T > & get_ref()
Plus_Vector_Primitive(const VEC_TYPE &lhs_, double rhs_)
Rcpp::traits::Extractor< REALSXP, NA, T >::type EXT
Rcpp::VectorBase< REALSXP, NA, T > VEC_TYPE
double operator[](R_xlen_t i) const
double operator[](R_xlen_t i) const
Plus_Vector_Primitive(const VEC_TYPE &lhs_, double rhs_)
Rcpp::VectorBase< REALSXP, false, T > VEC_TYPE
Rcpp::traits::Extractor< REALSXP, false, T >::type EXT
Plus_Vector_Primitive(const VEC_TYPE &lhs_, STORAGE rhs_)
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, false, T > VEC_TYPE
Rcpp::traits::Extractor< RTYPE, false, T >::type EXT
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< REALSXP, NA, T > VEC_TYPE
Plus_Vector_Primitive_nona(const VEC_TYPE &lhs_, double rhs_)
Rcpp::traits::Extractor< REALSXP, NA, T >::type EXT
double operator[](R_xlen_t i) const
Rcpp::VectorBase< REALSXP, false, T > VEC_TYPE
Rcpp::traits::Extractor< REALSXP, false, T >::type EXT
Plus_Vector_Primitive_nona(const VEC_TYPE &lhs_, double rhs_)
double operator[](R_xlen_t i) const
Plus_Vector_Primitive_nona(const VEC_TYPE &lhs_, STORAGE rhs_)
Rcpp::traits::Extractor< RTYPE, false, T >::type EXT
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, false, T > VEC_TYPE
STORAGE operator[](R_xlen_t i) const
STORAGE operator[](R_xlen_t i) const
Rcpp::traits::Extractor< RTYPE, NA, T >::type EXT
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
Plus_Vector_Primitive_nona(const VEC_TYPE &lhs_, STORAGE rhs_)
traits::storage_type< RTYPE >::type STORAGE
Plus_Vector_Primitive(const VEC_TYPE &lhs_, STORAGE rhs_)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
STORAGE operator[](R_xlen_t i) const
Rcpp::traits::Extractor< RTYPE, NA, T >::type EXT
traits::storage_type< RTYPE >::type STORAGE
double operator[](R_xlen_t i) const
Rcpp::VectorBase< REALSXP, RHS_NA, RHS_T > RHS_TYPE
Rcpp::VectorBase< REALSXP, LHS_NA, LHS_T > LHS_TYPE
Rcpp::traits::Extractor< REALSXP, LHS_NA, LHS_T >::type LHS_EXT
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::traits::Extractor< REALSXP, RHS_NA, RHS_T >::type RHS_EXT
Rcpp::traits::Extractor< REALSXP, LHS_NA, LHS_T >::type LHS_EXT
Rcpp::traits::Extractor< REALSXP, false, RHS_T >::type RHS_EXT
Rcpp::VectorBase< REALSXP, false, RHS_T > RHS_TYPE
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< REALSXP, LHS_NA, LHS_T > LHS_TYPE
double operator[](R_xlen_t i) const
double operator[](R_xlen_t i) const
Rcpp::traits::Extractor< REALSXP, RHS_NA, RHS_T >::type RHS_EXT
Rcpp::VectorBase< REALSXP, false, LHS_T > LHS_TYPE
Rcpp::traits::Extractor< REALSXP, false, LHS_T >::type LHS_EXT
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< REALSXP, RHS_NA, RHS_T > RHS_TYPE
Rcpp::traits::Extractor< REALSXP, false, RHS_T >::type RHS_EXT
Rcpp::traits::Extractor< REALSXP, false, LHS_T >::type LHS_EXT
Rcpp::VectorBase< REALSXP, false, LHS_T > LHS_TYPE
Rcpp::VectorBase< REALSXP, false, RHS_T > RHS_TYPE
double operator[](R_xlen_t i) const
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
STORAGE operator[](R_xlen_t i) const
Rcpp::traits::Extractor< RTYPE, false, RHS_T >::type RHS_EXT
Rcpp::VectorBase< RTYPE, LHS_NA, LHS_T > LHS_TYPE
Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T >::type LHS_EXT
Rcpp::VectorBase< RTYPE, false, RHS_T > RHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T >::type RHS_EXT
Rcpp::VectorBase< RTYPE, false, LHS_T > LHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, RHS_NA, RHS_T > RHS_TYPE
Rcpp::traits::Extractor< RTYPE, false, LHS_T >::type LHS_EXT
STORAGE operator[](R_xlen_t i) const
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, false, LHS_T > LHS_TYPE
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::traits::Extractor< RTYPE, false, LHS_T >::type LHS_EXT
Rcpp::VectorBase< RTYPE, false, RHS_T > RHS_TYPE
STORAGE operator[](R_xlen_t i) const
Rcpp::traits::Extractor< RTYPE, false, RHS_T >::type RHS_EXT
STORAGE operator[](R_xlen_t i) const
Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T >::type LHS_EXT
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, RHS_NA, RHS_T > RHS_TYPE
Plus_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< RTYPE, LHS_NA, LHS_T > LHS_TYPE
Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T >::type RHS_EXT
sugar::IsNa< RTYPE, NA, T > is_na(const Rcpp::VectorBase< RTYPE, NA, T > &t)
Date operator+(const Date &date, int offset)