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

Method apply

inst/include/Rcpp/sugar/functions/all.h:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 All( const VEC_TYPE& t ) : PARENT() , object(t) {}
34
35 void apply(){
36 R_xlen_t n = object.size() ;
37 int current = 0 ;
38 PARENT::reset() ;
39 for( R_xlen_t i=0 ; i<n ; i++){
40 current = object[i] ;
41 if( current == FALSE ) {
42 PARENT::set_false() ;
43 return ;
44 }
45 if( Rcpp::traits::is_na<LGLSXP>(current) ) {
46 PARENT::set_na();
47 }
48 }
49 if( PARENT::is_unresolved() ){
50 PARENT::set_true() ;
51 }
52 }
53private:
54 const VEC_TYPE& object ;
55

Callers

nothing calls this directly

Calls 2

is_na<LGLSXP>Function · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected