45 B.set_size(2 *
A.n_elem);
115 (*this).end_of_row();
120 template<
typename T1>
132 uword max_n_cols = (*(A[0])).n_cols;
138 if(max_n_cols < n_cols)
144 const uword max_n_rows = ((*(A[n_rows-1])).n_cols == 0) ? n_rows-1 : n_rows;
148 X.set_size(max_n_rows, max_n_cols);
168 arma_debug_check( (max_n_rows > 1),
"matrix initialisation: incompatible dimensions" );
172 X.set_size(1, n_cols);
179 const bool is_vec = ( (max_n_rows == 1) || (max_n_cols == 1) );
181 arma_debug_check( (is_vec ==
false),
"matrix initialisation: incompatible dimensions" );
185 X.set_size(n_elem, 1);
218 template<
typename T1>
229 (*(A[
n_rows-1])).insert(val);
235 template<
typename T1>
263 template<
typename T1>
277 template<
typename T1>
333 template<
typename oT>
350 template<
typename oT>
362 template<
typename oT>
400 template<
typename T1>
427 template<
typename T1>
450 (*this).end_of_row();
455 template<
typename T1>
467 uword max_n_cols = (*(A[0])).n_cols;
473 if(max_n_cols < n_cols)
479 const uword max_n_rows = ((*(A[n_rows-1])).n_cols == 0) ? n_rows-1 : n_rows;
481 X.set_size(max_n_rows, max_n_cols);
512 template<
typename T1>
523 (*(A[
n_rows-1])).insert(val);
529 template<
typename T1>
560 template<
typename T1>
574 template<
typename T1>
A lightweight array for POD types. If the amount of memory requested is small, the stack is used...
arma_hot static arma_inline void copy(eT *dest, const eT *src, const uword n_elem)
const uword n_rows
number of rows in the field (read-only)
const uword n_cols
number of columns in the field (read-only)
void insert(const object_type &val) const
T1::object_type object_type
void set_size(const uword n_obj_in)
arma_inline const Op< T1, op_max > max(const Base< typename T1::elem_type, T1 > &X, const uword dim=0)
Delayed 'maximum values' operation. The dimension, along which the maxima are found, is set via 'dim'. For dim = 0, the maximum value of each column is found (i.e. searches by traversing across rows). For dim = 1, the maximum value of each row is found (i.e. searches by traversing across columns). The default is dim = 0.
podarray< mat_injector_row< elem_type > * > * AA
podarray< field_injector_row< object_type > * > * AA
void insert(const oT &val) const
static arma_inline T1 & rw(const T1 &x)
internal function to allow modification of data declared as read-only
subview_field< oT > col(const uword col_num)
creation of subview_field (column of a field)
podarray< mat_injector_row< elem_type > * > * BB
mat_injector(T1 &in_X, const elem_type val)
void insert(const elem_type val) const
#define arma_ignore(variable)
podarray< field_injector_row< object_type > * > * BB
#define arma_extra_debug_sigprint
subview_field< oT > row(const uword row_num)
creation of subview_field (row of a field)
arma_inline eT * memptr()
void insert(const eT val) const
void set_size(const uword new_n_elem)
const uword n_elem
number of elements in the field (read-only)
field_injector(T1 &in_X, const object_type &val)