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

Class Row

inst/include/Rcpp/sugar/matrix/row.h:29–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28template <int RTYPE, bool LHS_NA, typename LHS_T>
29class Row : public MatrixBase<
30 INTSXP ,
31 false ,
32 Row<RTYPE,LHS_NA,LHS_T>
33> {
34public:
35 typedef Rcpp::MatrixBase<RTYPE,LHS_NA,LHS_T> LHS_TYPE ;
36
37 Row( const LHS_TYPE& lhs) : nr( lhs.nrow() ), nc( lhs.ncol() ) {}
38
39 inline int operator()( int i, int j ) const {
40 return i + 1 ;
41 }
42
43 inline R_xlen_t size() const { return static_cast<R_xlen_t>(nr) * nc ; }
44 inline int nrow() const { return nr; }
45 inline int ncol() const { return nc; }
46
47private:
48 int nr, nc ;
49} ;
50
51} // sugar
52

Callers 2

rowMethod · 0.85
operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected