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

Method Diff

inst/include/Rcpp/sugar/functions/diff.h:37–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
36
37 Diff( const LHS_TYPE& lhs_ ) :
38 lhs(lhs_),
39 previous(lhs_[0]),
40 previous_index(0),
41 was_na(traits::is_na<RTYPE>(previous))
42 {}
43
44 inline STORAGE operator[]( R_xlen_t i ) const {
45 STORAGE y = lhs[i+1] ;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected