22 #ifndef Rcpp__sugar__ifelse_h
23 #define Rcpp__sugar__ifelse_h
30 bool COND_NA,
typename COND_T,
31 bool LHS_NA ,
typename LHS_T,
32 bool RHS_NA ,
typename RHS_T
36 ( COND_NA || LHS_NA || RHS_NA ) ,
37 IfElse<RTYPE,COND_NA,COND_T,LHS_NA,LHS_T,RHS_NA,RHS_T>
58 if( x )
return lhs[i] ;
74 bool LHS_NA ,
typename LHS_T,
75 bool RHS_NA ,
typename RHS_T
79 ( LHS_NA || RHS_NA ) ,
80 IfElse<RTYPE,false,COND_T,LHS_NA,LHS_T,RHS_NA,RHS_T>
116 bool COND_NA,
typename COND_T,
117 bool RHS_NA ,
typename RHS_T
122 IfElse_Primitive_Vector<RTYPE,COND_NA,COND_T,RHS_NA,RHS_T>
155 bool RHS_NA ,
typename RHS_T
160 IfElse_Primitive_Vector<RTYPE,false,COND_T,RHS_NA,RHS_T>
193 bool COND_NA,
typename COND_T,
194 bool LHS_NA ,
typename LHS_T
199 IfElse_Vector_Primitive<RTYPE,COND_NA,COND_T,LHS_NA,LHS_T>
215 if( x )
return lhs[i] ;
231 bool LHS_NA ,
typename LHS_T
236 IfElse_Vector_Primitive<RTYPE,false,COND_T,LHS_NA,LHS_T>
271 bool COND_NA,
typename COND_T
276 IfElse_Primitive_Primitive<RTYPE,COND_NA,COND_T>
304 int RTYPE,
typename COND_T
309 IfElse_Primitive_Primitive<RTYPE,false,COND_T>
337 bool COND_NA,
typename COND_T,
338 bool LHS_NA ,
typename LHS_T,
339 bool RHS_NA ,
typename RHS_T
353 bool COND_NA,
typename COND_T,
354 bool RHS_NA ,
typename RHS_T
356 inline sugar::IfElse_Primitive_Vector< RTYPE,COND_NA,COND_T,RHS_NA,RHS_T >
367 bool COND_NA,
typename COND_T,
368 bool RHS_NA ,
typename RHS_T
370 inline sugar::IfElse_Vector_Primitive< RTYPE,COND_NA,COND_T,RHS_NA,RHS_T >
380 bool COND_NA,
typename COND_T
382 inline sugar::IfElse_Primitive_Primitive< REALSXP,COND_NA,COND_T >
392 bool COND_NA,
typename COND_T
394 inline sugar::IfElse_Primitive_Primitive< INTSXP,COND_NA,COND_T >
404 bool COND_NA,
typename COND_T
406 inline sugar::IfElse_Primitive_Primitive< CPLXSXP,COND_NA,COND_T >
416 bool COND_NA,
typename COND_T
418 inline sugar::IfElse_Primitive_Primitive< LGLSXP,COND_NA,COND_T >
IfElse< RTYPE, COND_NA, COND_T, LHS_NA, LHS_T, RHS_NA, RHS_T > & get_ref()
IfElse(const COND_TYPE &cond_, 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
Rcpp::traits::Extractor< RTYPE,LHS_NA,LHS_T >::type LHS_EXT
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< LGLSXP, false, COND_T > COND_TYPE
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE,RHS_NA,RHS_T > RHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
STORAGE operator[](R_xlen_t i) const
IfElse_Primitive_Primitive(const COND_TYPE &cond_, STORAGE lhs_, STORAGE rhs_)
Rcpp::VectorBase< LGLSXP, false, COND_T > COND_TYPE
traits::storage_type< RTYPE >::type STORAGE
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< LGLSXP, COND_NA, COND_T > COND_TYPE
IfElse_Primitive_Primitive(const COND_TYPE &cond_, STORAGE lhs_, STORAGE rhs_)
Rcpp::traits::Extractor< RTYPE,RHS_NA,RHS_T >::type RHS_EXT
IfElse_Primitive_Vector(const COND_TYPE &cond_, STORAGE lhs_, const RHS_TYPE &rhs_)
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE,RHS_NA,RHS_T > RHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< LGLSXP, false, COND_T > COND_TYPE
Rcpp::VectorBase< RTYPE,RHS_NA,RHS_T > RHS_TYPE
STORAGE operator[](R_xlen_t i) const
traits::storage_type< RTYPE >::type STORAGE
Rcpp::traits::Extractor< RTYPE,RHS_NA,RHS_T >::type RHS_EXT
IfElse_Primitive_Vector(const COND_TYPE &cond_, STORAGE lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< LGLSXP, COND_NA, COND_T > COND_TYPE
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE,LHS_NA,LHS_T > LHS_TYPE
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< LGLSXP, false, COND_T > COND_TYPE
IfElse_Vector_Primitive(const COND_TYPE &cond_, const LHS_TYPE &lhs_, STORAGE rhs_)
Rcpp::traits::Extractor< RTYPE,LHS_NA,LHS_T >::type LHS_EXT
Rcpp::VectorBase< RTYPE,LHS_NA,LHS_T > LHS_TYPE
IfElse_Vector_Primitive(const COND_TYPE &cond_, const LHS_TYPE &lhs_, STORAGE rhs_)
Rcpp::VectorBase< LGLSXP, COND_NA, COND_T > COND_TYPE
Rcpp::traits::Extractor< RTYPE,LHS_NA,LHS_T >::type LHS_EXT
traits::storage_type< RTYPE >::type STORAGE
STORAGE operator[](R_xlen_t i) const
Rcpp::VectorBase< RTYPE,LHS_NA,LHS_T > LHS_TYPE
Rcpp::VectorBase< RTYPE,RHS_NA,RHS_T > RHS_TYPE
STORAGE operator[](R_xlen_t i) const
IfElse(const COND_TYPE &cond_, const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
traits::storage_type< RTYPE >::type STORAGE
Rcpp::VectorBase< LGLSXP, COND_NA, COND_T > COND_TYPE
#define DEMANGLE(__TYPE__)
bool is_na< LGLSXP >(int x)
sugar::IfElse< RTYPE, COND_NA, COND_T, LHS_NA, LHS_T, RHS_NA, RHS_T > ifelse(const Rcpp::VectorBase< LGLSXP, COND_NA, COND_T > &cond, const Rcpp::VectorBase< RTYPE, LHS_NA, LHS_T > &lhs, const Rcpp::VectorBase< RTYPE, RHS_NA, RHS_T > &rhs)