32 typedef typename T1::elem_type eT;
37 ea_type PA = A.get_ea();
38 const uword n_elem = A.get_n_elem();
45 for(
uword i=0; i<n_elem; ++i)
49 indices_mem[n_nz] = i;
59 template<
typename T1,
typename op_type>
74 typedef typename T1::elem_type eT;
81 ea_type PA = A.get_ea();
82 const uword n_elem = A.get_n_elem();
89 for(
uword i=0; i<n_elem; ++i)
105 else not_zero =
false;
109 indices_mem[n_nz] = i;
119 template<
typename T1,
typename op_type>
134 typedef typename T1::elem_type eT;
137 const eT val = X.
aux;
141 ea_type PA = A.get_ea();
142 const uword n_elem = A.get_n_elem();
149 for(
uword i=0; i<n_elem; ++i)
151 const eT tmp = PA[i];
157 else not_zero =
false;
161 indices_mem[n_nz] = i;
171 template<
typename T1,
typename T2,
typename glue_type>
188 typedef typename T1::elem_type eT1;
189 typedef typename T2::elem_type eT2;
199 ea_type1 PA = A.get_ea();
200 ea_type2 PB = B.get_ea();
201 const uword n_elem = B.get_n_elem();
208 for(
uword i=0; i<n_elem; ++i)
210 const eT1 tmp1 = PA[i];
211 const eT2 tmp2 = PB[i];
221 else not_zero =
false;
225 indices_mem[n_nz] = i;
235 template<
typename T1,
typename T2,
typename glue_type>
260 ea_type1 PA = A.get_ea();
261 ea_type2 PB = B.get_ea();
262 const uword n_elem = B.get_n_elem();
269 for(
uword i=0; i<n_elem; ++i)
275 else not_zero =
false;
279 indices_mem[n_nz] = i;
289 template<
typename T1>
306 out = (k > 0 && k <= n_nz) ? indices.
rows(0, k-1 ) : indices.
rows(0, n_nz-1);
310 out = (k > 0 && k <= n_nz) ? indices.
rows(n_nz-k, n_nz-1) : indices.
rows(0, n_nz-1);
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
arma_aligned uword aux_uword_b
storage of auxiliary data, uword format
void set_size(const uword in_elem)
change the matrix to have user specified dimensions (data is not preserved)
arma_aligned const T1 & m
storage of reference to the operand (eg. a matrix)
arma_aligned const T1 & A
first operand
arma_inline const derived & get_ref() const
static uword helper(Mat< uword > &indices, const Base< typename T1::elem_type, T1 > &X)
arma_aligned const T2 & B
second operand
arma_aligned in_eT aux
storage of auxiliary data, using the element type as used by T1
#define arma_debug_assert_same_size
static void apply(Mat< uword > &out, const mtOp< uword, T1, op_find > &X)
arma_inline subview< eT > rows(const uword in_row1, const uword in_row2)
creation of subview (submatrix comprised of specified row vectors)
#define arma_ignore(variable)
#define arma_extra_debug_sigprint
arma_aligned uword aux_uword_a
storage of auxiliary data, uword format