MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / IfElse

Method IfElse

inst/include/Rcpp/sugar/functions/ifelse.h:48–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46 // typedef typename Rcpp::traits::Extractor<RTYPE ,RHS_NA ,RHS_T>::type RHS_EXT ;
47
48 IfElse( const COND_TYPE& cond_, const LHS_TYPE& lhs_, const RHS_TYPE& rhs_ ) :
49 cond(cond_), lhs(lhs_.get_ref()), rhs(rhs_.get_ref()) {
50 /* FIXME : cond, lhs and rhs must all have the same size */
51
52 RCPP_DEBUG( DEMANGLE(IfElse) ) ;
53 }
54
55 inline STORAGE operator[]( R_xlen_t i ) const {
56 int x = cond[i] ;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected