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

Method Diag_Extractor

inst/include/Rcpp/sugar/matrix/diag.h:34–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32 typedef typename Rcpp::traits::storage_type<RTYPE>::type STORAGE ;
33
34 Diag_Extractor( const MAT_TYPE& object_ ) : object(object_), n(0) {
35 int nr = object.nrow() ;
36 int nc = object.ncol() ;
37 n = (nc < nr ) ? nc : nr ;
38 }
39
40 inline STORAGE operator[]( int i ) const {
41 return object( i, i ) ;

Callers

nothing calls this directly

Calls 2

nrowMethod · 0.45
ncolMethod · 0.45

Tested by

no test coverage detected