27 eT min_val = priv::most_pos<eT>();
31 for(i=0, j=1; j<n_elem; i+=2, j+=2)
70 eT min_val = priv::most_pos<eT>();
76 for(i=0, j=1; j<n_elem; i+=2, j+=2)
106 index_of_min_val = best_index;
113 template<
typename eT>
122 eT min_val = priv::most_pos<eT>();
124 for(
uword col=0; col<X_n_cols; ++col)
126 const eT tmp_val = X.
at(row,col);
128 if(tmp_val < min_val)
139 template<
typename eT>
148 eT min_val = priv::most_pos<eT>();
150 for(
uword i=0; i<X_n_elem; ++i)
154 if(tmp_val < min_val)
165 template<
typename eT>
174 eT min_val = priv::most_pos<eT>();;
176 for(
uword i=0; i<X_n_elem; ++i)
180 if(tmp_val < min_val)
195 template<
typename T1>
200 typedef typename T1::elem_type eT;
219 eT* out_mem = out.
memptr();
221 for(
uword col=0; col<X_n_cols; ++col)
231 arma_debug_check( (X_n_cols == 0),
"min(): given object has zero columns" );
235 eT* out_mem = out.
memptr();
237 for(
uword row=0; row<X_n_rows; ++row)
254 T min_val = priv::most_pos<T>();
256 for(
uword i=0; i<n_elem; ++i)
260 if(tmp_val < min_val)
280 T min_val = priv::most_pos<T>();
282 for(
uword i=0; i<n_elem; ++i)
286 if(tmp_val < min_val)
293 index_of_min_val = index;
307 const uword X_n_cols = X.n_cols;
310 T min_val = priv::most_pos<T>();
312 for(
uword col=0; col<X_n_cols; ++col)
314 const T tmp_val =
std::abs(X.at(row,col));
316 if(tmp_val < min_val)
323 return X.at(row,index);
335 const uword X_n_elem = X.n_elem;
337 T min_val = priv::most_pos<T>();
339 for(
uword i=0; i<X_n_elem; ++i)
343 if(tmp_val < min_val)
362 const uword X_n_elem = X.n_elem;
364 T min_val = priv::most_pos<T>();
366 for(
uword i=0; i<X_n_elem; ++i)
370 if(tmp_val < min_val)
arma_inline arma_warn_unused eT * memptr()
returns a pointer to array of eTs used by the matrix
void set_size(const uword in_elem)
change the matrix to have user specified dimensions (data is not preserved)
const uword n_cols
number of columns in the matrix (read-only)
static eT direct_min(const eT *const X, const uword N)
const uword n_rows
number of rows in the matrix (read-only)
#define arma_extra_debug_print
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
arma_inline arma_warn_unused eT & at(const uword i)
linear element accessor (treats the matrix as a vector); no bounds check.
arma_inline const eOp< T1, eop_abs > abs(const Base< typename T1::elem_type, T1 > &X, const typename arma_not_cx< typename T1::elem_type >::result *junk=0)
#define arma_extra_debug_sigprint
static void apply(Mat< typename T1::elem_type > &out, const Op< T1, op_min > &in)
For each row or for each column, find the minimum value. The result is stored in a dense matrix that ...
Class for storing data required to extract and set the diagonals of a matrix.
arma_aligned uword aux_uword_a
storage of auxiliary data, uword format