22#ifndef Rcpp__sugar__logical_or_h
23#define Rcpp__sugar__logical_or_h
28template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
32 Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
47 int left =
lhs.get() ;
50 }
else if( left == TRUE ){
64template <
bool LHS_NA,
typename LHS_T,
typename RHS_T>
68 Or_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,false,RHS_T>
84 int right =
rhs.get() ;
100template <
typename LHS_T,
bool RHS_NA,
typename RHS_T>
104 Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T>
120 int left =
lhs.get() ;
135template <
typename LHS_T,
typename RHS_T>
139 Or_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T>
154 int left =
lhs.get() ;
169template <
bool LHS_NA,
typename LHS_T>
173 And_SingleLogicalResult_bool<LHS_NA,LHS_T>
201template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
210 if(
lhs[i] == TRUE ||
rhs[i] == TRUE )
return TRUE ;
211 if(
lhs[i] == FALSE &&
rhs[i] == FALSE )
return FALSE ;
214 inline R_xlen_t
size()
const {
return lhs.size(); }
220template <
typename LHS_T,
bool RHS_NA,
typename RHS_T>
222 :
public Rcpp::VectorBase< LGLSXP, true, Or_LogicalExpression_LogicalExpression<false,LHS_T,RHS_NA,RHS_T> >{
230 if(
lhs[i] == TRUE ||
rhs[i] == TRUE )
return TRUE ;
231 if(
rhs[i] == NA_LOGICAL )
return NA_LOGICAL ;
234 inline R_xlen_t
size()
const {
return lhs.size(); }
240template <
bool LHS_NA,
typename LHS_T,
typename RHS_T>
242 :
public Rcpp::VectorBase< LGLSXP, true, Or_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,false,RHS_T> >{
250 if(
lhs[i] == TRUE ||
rhs[i] == TRUE )
return TRUE ;
251 if(
lhs[i] == NA_LOGICAL )
return NA_LOGICAL ;
254 inline R_xlen_t
size()
const {
return lhs.size(); }
260template <
typename LHS_T,
typename RHS_T>
262 :
public Rcpp::VectorBase< LGLSXP, false, Or_LogicalExpression_LogicalExpression<false,LHS_T,false,RHS_T> >{
270 if(
lhs[i] == TRUE ||
rhs[i] == TRUE )
return TRUE ;
273 inline R_xlen_t
size()
const {
return lhs.size(); }
285template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
294template <
bool LHS_NA,
typename LHS_T>
303template <
bool LHS_NA,
typename LHS_T>
313template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
Rcpp::VectorBase< LGLSXP, false, RHS_T > RHS_TYPE
Or_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
int operator[](R_xlen_t i) const
Rcpp::VectorBase< LGLSXP, LHS_NA, LHS_T > LHS_TYPE
int operator[](R_xlen_t i) const
Rcpp::VectorBase< LGLSXP, RHS_NA, RHS_T > RHS_TYPE
Rcpp::VectorBase< LGLSXP, false, LHS_T > LHS_TYPE
Or_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
int operator[](R_xlen_t i) const
Or_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< LGLSXP, false, LHS_T > LHS_TYPE
Rcpp::VectorBase< LGLSXP, false, RHS_T > RHS_TYPE
int operator[](R_xlen_t i) const
Rcpp::VectorBase< LGLSXP, RHS_NA, RHS_T > RHS_TYPE
Or_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< LGLSXP, LHS_NA, LHS_T > LHS_TYPE
Or_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult< LHS_NA, Or_SingleLogicalResult_SingleLogicalResult< LHS_NA, LHS_T, false, RHS_T > > BASE
SingleLogicalResult< LHS_NA, LHS_T > LHS_TYPE
SingleLogicalResult< false, RHS_T > RHS_TYPE
Or_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult< RHS_NA, Or_SingleLogicalResult_SingleLogicalResult< false, LHS_T, RHS_NA, RHS_T > > BASE
SingleLogicalResult< RHS_NA, RHS_T > RHS_TYPE
SingleLogicalResult< false, LHS_T > LHS_TYPE
SingleLogicalResult< false, Or_SingleLogicalResult_SingleLogicalResult< false, LHS_T, false, RHS_T > > BASE
Or_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult< false, LHS_T > LHS_TYPE
SingleLogicalResult< false, RHS_T > RHS_TYPE
SingleLogicalResult< LHS_NA, LHS_T > LHS_TYPE
SingleLogicalResult< RHS_NA, RHS_T > RHS_TYPE
Or_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult<(LHS_NA||RHS_NA), Or_SingleLogicalResult_SingleLogicalResult< LHS_NA, LHS_T, RHS_NA, RHS_T > > BASE
Or_SingleLogicalResult_bool(const LHS_TYPE &lhs_, bool rhs_)
SingleLogicalResult< LHS_NA, LHS_T > LHS_TYPE
SingleLogicalResult< LHS_NA, Or_SingleLogicalResult_bool< LHS_NA, LHS_T > > BASE
bool is_na(typename storage_type< RTYPE >::type)
Rcpp::sugar::Or_LogicalExpression_LogicalExpression< LHS_NA, LHS_T, RHS_NA, RHS_T > operator|(const Rcpp::VectorBase< LGLSXP, LHS_NA, LHS_T > &lhs, const Rcpp::VectorBase< LGLSXP, RHS_NA, RHS_T > &rhs)
Rcpp::sugar::Or_SingleLogicalResult_SingleLogicalResult< LHS_NA, LHS_T, RHS_NA, RHS_T > operator||(const Rcpp::sugar::SingleLogicalResult< LHS_NA, LHS_T > &lhs, const Rcpp::sugar::SingleLogicalResult< LHS_NA, LHS_T > &rhs)