23#ifndef Rcpp__sugar__plus_h
24#define Rcpp__sugar__plus_h
29 template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
49 inline R_xlen_t
size()
const {
return lhs.size() ; }
59 template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
61 public Rcpp::VectorBase<REALSXP, true , Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
76 inline R_xlen_t
size()
const {
return lhs.size() ; }
87 template <
int RTYPE,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
88 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> > {
103 return lhs[i] + rhs_;
106 inline R_xlen_t
size()
const {
return lhs.size() ; }
113 template <
typename LHS_T,
bool RHS_NA,
typename RHS_T >
115 public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> > {
130 inline R_xlen_t
size()
const {
return lhs.size() ; }
140 template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
typename RHS_T >
141 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> > {
156 return lhs_ +
rhs[i];
159 inline R_xlen_t
size()
const {
return lhs.size() ; }
166 template <
bool LHS_NA,
typename LHS_T,
typename RHS_T >
168 public Rcpp::VectorBase<REALSXP, true , Plus_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> > {
183 inline R_xlen_t
size()
const {
return lhs.size() ; }
194 template <
int RTYPE,
typename LHS_T,
typename RHS_T >
195 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> > {
211 inline R_xlen_t
size()
const {
return lhs.size() ; }
218 template <
typename LHS_T,
typename RHS_T >
220 public Rcpp::VectorBase<REALSXP, false , Plus_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> > {
235 inline R_xlen_t
size()
const {
return lhs.size() ; }
248 template <
int RTYPE,
bool NA,
typename T>
266 inline R_xlen_t
size()
const {
return lhs.size() ; }
275 template <
bool NA,
typename T>
277 public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Primitive<REALSXP,NA,T> > {
290 inline R_xlen_t
size()
const {
return lhs.size() ; }
299 template <
int RTYPE,
typename T>
314 inline R_xlen_t
size()
const {
return lhs.size() ; }
322 template <
typename T>
324 public Rcpp::VectorBase<REALSXP,false, Plus_Vector_Primitive<REALSXP,false,T> > {
337 inline R_xlen_t
size()
const {
return lhs.size() ; }
350 template <
int RTYPE,
bool NA,
typename T>
366 inline R_xlen_t
size()
const {
return lhs.size() ; }
373 template <
bool NA,
typename T>
375 public Rcpp::VectorBase<REALSXP,true, Plus_Vector_Primitive_nona<REALSXP,NA,T> > {
388 inline R_xlen_t
size()
const {
return lhs.size() ; }
398 template <
int RTYPE,
typename T>
413 inline R_xlen_t
size()
const {
return lhs.size() ; }
421 template <
typename T>
423 public Rcpp::VectorBase<REALSXP,false, Plus_Vector_Primitive_nona<REALSXP,false,T> > {
435 inline R_xlen_t
size()
const {
return lhs.size() ; }
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
traits used to dispatch wrap
bool is_na(typename storage_type< RTYPE >::type)
sugar::IsNa< RTYPE, NA, T > is_na(const Rcpp::VectorBase< RTYPE, NA, T > &t)
Date operator+(const Date &date, int offset)
#define RCPP_SAFE_ADD(a, b)