22 typename T1::elem_type
27 typedef typename T1::elem_type eT;
31 arma_debug_check( (A.get_n_rows() != A.get_n_cols()),
"trace(): matrix must be square sized" );
33 const uword N = A.get_n_rows();
36 for(
uword i=0; i<N; ++i)
49 typename T1::elem_type
54 typedef typename T1::elem_type eT;
62 for(
uword i=0; i<N; ++i)
72 template<
typename T1,
typename T2>
75 typename T1::elem_type
80 typedef typename T1::elem_type eT;
96 for(
uword i=0; i<N1; ++i)
98 const eT* B_colmem = B.
colptr(i);
101 for(
uword j=0; j<N2; ++j)
103 acc += A.
at(i,j) * B_colmem[j];
arma_inline const derived & get_ref() const
const uword n_cols
number of columns in the matrix (read-only)
const uword n_rows
number of rows in the matrix (read-only)
arma_aligned const T1 & m
storage of reference to the operand (eg. a matrix)
arma_inline arma_warn_unused eT * colptr(const uword in_col)
returns a pointer to array of eTs for a specified column; no bounds check
const T1 & A
first operand
arma_warn_unused T1::elem_type trace(const Base< typename T1::elem_type, T1 > &X)
Immediate trace (sum of diagonal elements) of a square dense matrix.
arma_inline arma_warn_unused eT & at(const uword i)
linear element accessor (treats the matrix as a vector); no bounds check.
const T2 & B
second operand
#define arma_extra_debug_sigprint
#define arma_debug_assert_mul_size