23 #ifndef Rcpp__vector__MatrixBase_h
24 #define Rcpp__vector__MatrixBase_h
31 template <
int RTYPE,
bool na,
typename MATRIX>
40 return static_cast<MATRIX&
>(*this) ;
44 return static_cast<const MATRIX*
>(
this)->
operator()(i, j) ;
47 inline R_xlen_t
size()
const {
return static_cast<const MATRIX&
>(*this).size() ; }
48 inline R_xlen_t
nrow()
const {
return static_cast<const MATRIX&
>(*this).nrow() ; }
49 inline R_xlen_t
ncol()
const {
return static_cast<const MATRIX&
>(*this).ncol() ; }
51 static MATRIX
eye(
int n) {
60 static MATRIX
ones(
int n) {
68 res.begin(), res.end(),
152 return (
i == y.
i &&
j == y.
j ) ;
155 return (
i != y.
i ||
j != y.
j ) ;
iterator operator+(difference_type n) const
bool operator==(const iterator &y) const
iterator(const MatrixBase &object_, R_xlen_t index_)
const MatrixBase & object
std::random_access_iterator_tag iterator_category
iterator(const iterator &other)
bool operator>=(const iterator &other) const
bool operator<(const iterator &other) const
bool operator>(const iterator &other) const
iterator & operator-=(difference_type n)
bool operator<=(const iterator &other) const
iterator operator-(difference_type n) const
difference_type operator-(const iterator &other) const
bool operator!=(const iterator &y) const
void update_index(int index_)
iterator & operator+=(difference_type n)
static MATRIX zeros(int n)
stored_type operator()(int i, int j) const
static MATRIX ones(int n)
traits::storage_type< RTYPE >::type stored_type
int get_column(int index, int nr)
int get_line(int index, int nr)
sugar::diag_result_type_trait< T >::type diag(const T &t)