23#ifndef Rcpp__sugar__times_h
24#define Rcpp__sugar__times_h
29 template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
50 inline R_xlen_t
size()
const {
return lhs.size() ; }
57 template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
59 public Rcpp::VectorBase<REALSXP, true , Times_Vector_Vector<REALSXP,LHS_NA,LHS_T,RHS_NA,RHS_T> > {
75 inline R_xlen_t
size()
const {
return lhs.size() ; }
84 template <
int RTYPE,
typename LHS_T,
bool RHS_NA,
typename RHS_T >
85 class Times_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> :
public Rcpp::VectorBase<RTYPE,true, Times_Vector_Vector<RTYPE,false,LHS_T,RHS_NA,RHS_T> > {
100 return lhs[i] * rhs_;
103 inline R_xlen_t
size()
const {
return lhs.size() ; }
110 template <
typename LHS_T,
bool RHS_NA,
typename RHS_T >
112 public Rcpp::VectorBase<REALSXP,true, Times_Vector_Vector<REALSXP,false,LHS_T,RHS_NA,RHS_T> > {
127 inline R_xlen_t
size()
const {
return lhs.size() ; }
136 template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
typename RHS_T >
137 class Times_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> :
public Rcpp::VectorBase<RTYPE, true , Times_Vector_Vector<RTYPE,LHS_NA,LHS_T,false,RHS_T> > {
152 return lhs_ *
rhs[i];
155 inline R_xlen_t
size()
const {
return lhs.size() ; }
162 template <
bool LHS_NA,
typename LHS_T,
typename RHS_T >
164 public Rcpp::VectorBase<REALSXP, true , Times_Vector_Vector<REALSXP,LHS_NA,LHS_T,false,RHS_T> > {
179 inline R_xlen_t
size()
const {
return lhs.size() ; }
187 template <
int RTYPE,
typename LHS_T,
typename RHS_T >
188 class Times_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> :
public Rcpp::VectorBase<RTYPE, false , Times_Vector_Vector<RTYPE,false,LHS_T,false,RHS_T> > {
204 inline R_xlen_t
size()
const {
return lhs.size() ; }
211 template <
typename LHS_T,
typename RHS_T >
213 public Rcpp::VectorBase<REALSXP, false , Times_Vector_Vector<REALSXP,false,LHS_T,false,RHS_T> > {
228 inline R_xlen_t
size()
const {
return lhs.size() ; }
236 template <
int RTYPE,
bool NA,
typename T>
254 inline R_xlen_t
size()
const {
return lhs.size() ; }
262 template <
bool NA,
typename T>
264 public Rcpp::VectorBase<REALSXP,true, Times_Vector_Primitive<REALSXP,NA,T> > {
277 inline R_xlen_t
size()
const {
return lhs.size() ; }
285 template <
int RTYPE,
typename T>
300 inline R_xlen_t
size()
const {
return lhs.size() ; }
309 template <
typename T>
311 public Rcpp::VectorBase<REALSXP,false, Times_Vector_Primitive<REALSXP,false,T> > {
323 inline R_xlen_t
size()
const {
return lhs.size() ; }
336 template <
int RTYPE,
bool NA,
typename T>
352 inline R_xlen_t
size()
const {
return lhs.size() ; }
360 template <
bool NA,
typename T>
362 public Rcpp::VectorBase<REALSXP,true, Times_Vector_Primitive_nona<REALSXP,NA,T> > {
375 inline R_xlen_t
size()
const {
return lhs.size() ; }
383 template <
int RTYPE,
typename T>
398 inline R_xlen_t
size()
const {
return lhs.size() ; }
405 template <
typename T>
407 public Rcpp::VectorBase<REALSXP,false, Times_Vector_Primitive_nona<REALSXP,false,T> > {
419 inline R_xlen_t
size()
const {
return lhs.size() ; }
428template <
int RTYPE,
bool NA,
typename T,
typename U>
438template <
int RTYPE,
bool NA,
typename T,
typename U>
439inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type,
typename traits::storage_type<RTYPE>::type>::value, sugar::Times_Vector_Primitive< RTYPE , NA , T > >::type
449template <
int RTYPE,
bool NA,
typename T,
typename U>
450inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type,
typename traits::storage_type<RTYPE>::type>::value, sugar::Times_Vector_Primitive_nona<RTYPE,NA,T> >::type
458template <
int RTYPE,
bool NA,
typename T,
typename U>
459inline typename traits::enable_if<traits::is_convertible<typename traits::remove_const_and_reference<U>::type,
typename traits::storage_type<RTYPE>::type>::value, sugar::Times_Vector_Primitive_nona< RTYPE , NA , T > >::type
468template <
int RTYPE,
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
469inline sugar::Times_Vector_Vector<
Times_Vector_Vector< RTYPE, LHS_NA, LHS_T, RHS_NA, RHS_T > & get_ref()
Rcpp::traits::Extractor< REALSXP, NA, T >::type EXT
Rcpp::VectorBase< REALSXP, NA, T > VEC_TYPE
Times_Vector_Primitive(const VEC_TYPE &lhs_, double rhs_)
double operator[](R_xlen_t i) const
Rcpp::traits::Extractor< REALSXP, false, T >::type EXT
Times_Vector_Primitive(const VEC_TYPE &lhs_, double rhs_)
double operator[](R_xlen_t i) const
Rcpp::VectorBase< REALSXP, false, T > VEC_TYPE
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
Times_Vector_Primitive(const VEC_TYPE &lhs_, STORAGE rhs_)
double operator[](R_xlen_t i) const
Rcpp::VectorBase< REALSXP, NA, T > VEC_TYPE
Rcpp::traits::Extractor< REALSXP, NA, T >::type EXT
Times_Vector_Primitive_nona(const VEC_TYPE &lhs_, double rhs_)
double operator[](R_xlen_t i) const
Times_Vector_Primitive_nona(const VEC_TYPE &lhs_, double rhs_)
Rcpp::VectorBase< REALSXP, false, T > VEC_TYPE
Rcpp::traits::Extractor< REALSXP, false, T >::type EXT
STORAGE operator[](R_xlen_t i) const
traits::storage_type< RTYPE >::type STORAGE
Times_Vector_Primitive_nona(const VEC_TYPE &lhs_, STORAGE rhs_)
Rcpp::traits::Extractor< RTYPE, false, T >::type EXT
Rcpp::VectorBase< RTYPE, false, T > VEC_TYPE
Rcpp::traits::Extractor< RTYPE, NA, T >::type EXT
STORAGE operator[](R_xlen_t i) const
traits::storage_type< RTYPE >::type STORAGE
Times_Vector_Primitive_nona(const VEC_TYPE &lhs_, STORAGE rhs_)
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
Rcpp::traits::Extractor< RTYPE, NA, T >::type EXT
Rcpp::VectorBase< RTYPE, NA, T > VEC_TYPE
traits::storage_type< RTYPE >::type STORAGE
Times_Vector_Primitive(const VEC_TYPE &lhs_, STORAGE rhs_)
STORAGE operator[](R_xlen_t i) const
Rcpp::traits::Extractor< REALSXP, RHS_NA, RHS_T >::type RHS_EXT
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::traits::Extractor< REALSXP, LHS_NA, LHS_T >::type LHS_EXT
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::VectorBase< REALSXP, false, RHS_T > RHS_TYPE
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::traits::Extractor< REALSXP, LHS_NA, LHS_T >::type LHS_EXT
Rcpp::traits::Extractor< REALSXP, false, RHS_T >::type RHS_EXT
double operator[](R_xlen_t i) const
Rcpp::VectorBase< REALSXP, LHS_NA, LHS_T > LHS_TYPE
Rcpp::traits::Extractor< REALSXP, false, LHS_T >::type LHS_EXT
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< REALSXP, false, LHS_T > LHS_TYPE
double operator[](R_xlen_t i) const
Rcpp::traits::Extractor< REALSXP, RHS_NA, RHS_T >::type RHS_EXT
Rcpp::VectorBase< REALSXP, RHS_NA, RHS_T > RHS_TYPE
Rcpp::traits::Extractor< REALSXP, false, LHS_T >::type LHS_EXT
double operator[](R_xlen_t i) const
Rcpp::VectorBase< REALSXP, false, RHS_T > RHS_TYPE
Rcpp::traits::Extractor< REALSXP, false, RHS_T >::type RHS_EXT
Rcpp::VectorBase< REALSXP, false, LHS_T > LHS_TYPE
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< RTYPE, LHS_NA, LHS_T > LHS_TYPE
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE, false, RHS_T > RHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
Rcpp::traits::Extractor< RTYPE, false, RHS_T >::type RHS_EXT
Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T >::type LHS_EXT
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
traits::storage_type< RTYPE >::type STORAGE
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE, RHS_NA, RHS_T > RHS_TYPE
Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T >::type RHS_EXT
Rcpp::traits::Extractor< RTYPE, false, LHS_T >::type LHS_EXT
Rcpp::VectorBase< RTYPE, false, LHS_T > LHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
STORAGE operator[](R_xlen_t i) const
Rcpp::traits::Extractor< RTYPE, false, LHS_T >::type LHS_EXT
Rcpp::traits::Extractor< RTYPE, false, RHS_T >::type RHS_EXT
Rcpp::VectorBase< RTYPE, false, LHS_T > LHS_TYPE
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< RTYPE, false, RHS_T > RHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< RTYPE, RHS_NA, RHS_T > RHS_TYPE
Rcpp::traits::Extractor< RTYPE, LHS_NA, LHS_T >::type LHS_EXT
Rcpp::traits::Extractor< RTYPE, RHS_NA, RHS_T >::type RHS_EXT
Times_Vector_Vector(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE, LHS_NA, LHS_T > LHS_TYPE
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)
traits::enable_if< traits::is_convertible< typenametraits::remove_const_and_reference< U >::type, typenametraits::storage_type< RTYPE >::type >::value, sugar::Times_Vector_Primitive< RTYPE, NA, T > >::type operator*(const VectorBase< RTYPE, NA, T > &lhs, const U &rhs)
#define RCPP_SAFE_MUL(a, b)