| 27 | |
| 28 | template <int RTYPE, bool LHS_NA, typename LHS_T> |
| 29 | class Row : public MatrixBase< |
| 30 | INTSXP , |
| 31 | false , |
| 32 | Row<RTYPE,LHS_NA,LHS_T> |
| 33 | > { |
| 34 | public: |
| 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 | |
| 47 | private: |
| 48 | int nr, nc ; |
| 49 | } ; |
| 50 | |
| 51 | } // sugar |
| 52 |
no outgoing calls
no test coverage detected