22#ifndef Rcpp__sugar__logical_and_h
23#define Rcpp__sugar__logical_and_h
28template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
32 And_SingleLogicalResult_SingleLogicalResult<LHS_NA,LHS_T,RHS_NA,RHS_T>
47 int left =
lhs.get() ;
50 }
else if( left == FALSE ){
64template <
bool LHS_NA,
typename LHS_T,
typename RHS_T>
68 And_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 And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,RHS_NA,RHS_T>
120 int left =
lhs.get() ;
135template <
typename LHS_T,
typename RHS_T>
139 And_SingleLogicalResult_SingleLogicalResult<false,LHS_T,false,RHS_T>
154 int left =
lhs.get() ;
170template <
bool LHS_NA,
typename LHS_T>
174 And_SingleLogicalResult_bool<LHS_NA,LHS_T>
204template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
213 if(
lhs[i] == TRUE &&
rhs[i] == TRUE )
return TRUE ;
214 if(
lhs[i] == NA_LOGICAL ||
rhs[i] == NA_LOGICAL )
return NA_LOGICAL ;
217 inline R_xlen_t
size()
const {
return lhs.size(); }
223template <
typename LHS_T,
bool RHS_NA,
typename RHS_T>
225 :
public Rcpp::VectorBase< LGLSXP, true, And_LogicalExpression_LogicalExpression<false,LHS_T,RHS_NA,RHS_T> >{
233 if(
lhs[i] == TRUE &&
rhs[i] == TRUE )
return TRUE ;
234 if(
rhs[i] == NA_LOGICAL )
return NA_LOGICAL ;
237 inline R_xlen_t
size()
const {
return lhs.size(); }
243template <
bool LHS_NA,
typename LHS_T,
typename RHS_T>
245 :
public Rcpp::VectorBase< LGLSXP, true, And_LogicalExpression_LogicalExpression<LHS_NA,LHS_T,false,RHS_T> >{
253 if(
lhs[i] == TRUE &&
rhs[i] == TRUE )
return TRUE ;
254 if(
lhs[i] == NA_LOGICAL )
return NA_LOGICAL ;
257 inline R_xlen_t
size()
const {
return lhs.size(); }
263template <
typename LHS_T,
typename RHS_T>
265 :
public Rcpp::VectorBase< LGLSXP, false, And_LogicalExpression_LogicalExpression<false,LHS_T,false,RHS_T> >{
273 if(
lhs[i] == TRUE &&
rhs[i] == TRUE )
return TRUE ;
276 inline R_xlen_t
size()
const {
return lhs.size(); }
286template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
295template <
bool LHS_NA,
typename LHS_T>
304template <
bool LHS_NA,
typename LHS_T>
314template <
bool LHS_NA,
typename LHS_T,
bool RHS_NA,
typename RHS_T>
Rcpp::sugar::And_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)
Rcpp::sugar::And_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)
int operator[](R_xlen_t i) const
And_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< LGLSXP, LHS_NA, 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
Rcpp::VectorBase< LGLSXP, false, LHS_T > LHS_TYPE
And_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
And_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< LGLSXP, false, RHS_T > RHS_TYPE
int operator[](R_xlen_t i) const
Rcpp::VectorBase< LGLSXP, false, LHS_T > LHS_TYPE
int operator[](R_xlen_t i) const
Rcpp::VectorBase< LGLSXP, RHS_NA, RHS_T > RHS_TYPE
And_LogicalExpression_LogicalExpression(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
Rcpp::VectorBase< LGLSXP, LHS_NA, LHS_T > LHS_TYPE
SingleLogicalResult< LHS_NA, LHS_T > LHS_TYPE
SingleLogicalResult< LHS_NA, And_SingleLogicalResult_SingleLogicalResult< LHS_NA, LHS_T, false, RHS_T > > BASE
And_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult< false, RHS_T > RHS_TYPE
SingleLogicalResult< false, LHS_T > LHS_TYPE
SingleLogicalResult< RHS_NA, And_SingleLogicalResult_SingleLogicalResult< false, LHS_T, RHS_NA, RHS_T > > BASE
And_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult< RHS_NA, RHS_T > RHS_TYPE
SingleLogicalResult< false, And_SingleLogicalResult_SingleLogicalResult< false, LHS_T, false, RHS_T > > BASE
SingleLogicalResult< false, LHS_T > LHS_TYPE
SingleLogicalResult< false, RHS_T > RHS_TYPE
And_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult< LHS_NA, LHS_T > LHS_TYPE
SingleLogicalResult< RHS_NA, RHS_T > RHS_TYPE
And_SingleLogicalResult_SingleLogicalResult(const LHS_TYPE &lhs_, const RHS_TYPE &rhs_)
SingleLogicalResult<(LHS_NA||RHS_NA), And_SingleLogicalResult_SingleLogicalResult< LHS_NA, LHS_T, RHS_NA, RHS_T > > BASE
SingleLogicalResult< LHS_NA, And_SingleLogicalResult_bool< LHS_NA, LHS_T > > BASE
And_SingleLogicalResult_bool(const LHS_TYPE &lhs_, bool rhs_)
SingleLogicalResult< LHS_NA, LHS_T > LHS_TYPE
bool is_na(typename storage_type< RTYPE >::type)