19 template<
typename eT,
typename gen_type>
30 template<
typename eT,
typename gen_type>
39 template<
typename eT,
typename gen_type>
53 template<
typename eT,
typename gen_type>
60 return ((i %
n_rows) == (i / n_rows)) ? eT(1) : eT(0);
70 template<
typename eT,
typename gen_type>
77 return (row == col) ? eT(1) : eT(0);
87 template<
typename eT,
typename gen_type>
106 template<
typename eT,
typename gen_type>
120 for(
uword i=0; i<N; ++i)
122 out.
at(i,i) += eT(1);
127 eT* out_mem = out.
memptr();
132 for(i=0, j=1; j<n_elem; i+=2, j+=2)
152 template<
typename eT,
typename gen_type>
166 for(
uword i=0; i<N; ++i)
168 out.
at(i,i) -= eT(1);
173 eT* out_mem = out.
memptr();
178 for(i=0, j=1; j<n_elem; i+=2, j+=2)
198 template<
typename eT,
typename gen_type>
212 for(
uword i=0; i<N; ++i)
214 for(
uword row=0; row<i; ++row) { out.
at(row,i) = eT(0); }
215 for(
uword row=i+1; row<
n_rows; ++row) { out.
at(row,i) = eT(0); }
220 eT* out_mem = out.
memptr();
225 for(i=0, j=1; j<n_elem; i+=2, j+=2)
245 template<
typename eT,
typename gen_type>
259 for(
uword i=0; i<N; ++i)
261 const eT zero = eT(0);
263 for(
uword row=0; row<i; ++row) { out.
at(row,i) /= zero; }
264 for(
uword row=i+1; row<
n_rows; ++row) { out.
at(row,i) /= zero; }
269 eT* out_mem = out.
memptr();
274 for(i=0, j=1; j<n_elem; i+=2, j+=2)
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
void apply_inplace_minus(Mat< eT > &out) const
void apply(Mat< eT > &out) const
arma_aligned const uword n_cols
const uword n_cols
number of columns in the matrix (read-only)
#define arma_debug_assert_same_size
const uword n_elem
number of elements in the matrix (read-only)
const uword n_rows
number of rows in the matrix (read-only)
arma_inline const Op< T1, op_min > min(const Base< typename T1::elem_type, T1 > &X, const uword dim=0)
Delayed 'minimum values' operation. The dimension, along which the minima are found, is set via 'dim'. For dim = 0, the minimum value of each column is found (i.e. searches by traversing across rows). For dim = 1, the minimum value of each row is found (i.e. searches by traversing across columns). The default is dim = 0.
arma_aligned const uword n_rows
static arma_inline eT generate()
arma_inline arma_warn_unused eT & at(const uword i)
linear element accessor (treats the matrix as a vector); no bounds check.
#define arma_extra_debug_sigprint
void apply_inplace_div(Mat< eT > &out) const
arma_inline Gen(const uword in_n_rows, const uword in_n_cols)
arma_inline eT operator[](const uword i) const
void apply_inplace_schur(Mat< eT > &out) const
void apply_inplace_plus(Mat< eT > &out) const
arma_inline eT at(const uword row, const uword col) const