23 #ifndef Rcpp__sugar__upper_tri_h
24 #define Rcpp__sugar__upper_tri_h
29 template <
int RTYPE,
bool NA,
typename T>
42 inline R_xlen_t
size()
const {
return static_cast<R_xlen_t
>(
nr) *
nc; }
43 inline int nrow()
const {
return nr; }
44 inline int ncol()
const {
return nc; }
56 inline bool get(
int i,
int j)
const {
return (this->*getter)(i, j); }
61 template <
int RTYPE,
bool NA,
typename T>
62 inline sugar::UpperTri<RTYPE, NA, T>
bool get_diag_false(int i, int j) const
bool get_diag_true(int i, int j) const
int operator()(int i, int j) const
UpperTri(const T &lhs, bool diag)
bool get(int i, int j) const
Rcpp::MatrixBase< RTYPE, NA, T > MatBase
bool(UpperTri::* Method)(int, int) const
sugar::UpperTri< RTYPE, NA, T > upper_tri(const Rcpp::MatrixBase< RTYPE, NA, T > &lhs, bool diag=false)
sugar::diag_result_type_trait< T >::type diag(const T &t)