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

Method MatrixColumn

inst/include/Rcpp/vector/MatrixColumn.h:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 typedef typename MATRIX::const_iterator const_iterator ;
36
37 MatrixColumn( MATRIX& parent, int i ) :
38 n(parent.nrow()),
39 start(parent.begin() + static_cast<R_xlen_t>(i) * n ),
40 const_start(const_cast<const MATRIX&>(parent).begin() + static_cast<R_xlen_t>(i) * n)
41 {
42 if( i < 0 || i >= parent.ncol() ) {
43 const char* fmt = "Column index is out of bounds: "
44 "[index=%i; column extent=%i].";
45 throw index_out_of_bounds(fmt, i, parent.ncol()) ;
46 }
47 }
48
49 MatrixColumn( const MATRIX& parent, int i ) :
50 n(parent.nrow()),

Callers

nothing calls this directly

Calls 3

nrowMethod · 0.45
beginMethod · 0.45
ncolMethod · 0.45

Tested by

no test coverage detected