Functions

Fn_min

//! More...

Functions

template<typename T1 >
arma_inline const Op< T1, op_minmin (const Base< typename T1::elem_type, T1 > &X, const u32 dim=0)
 //! Delayed 'minimum values' operation. //! The dimension, along which the minima 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. //! NOTE: This function works differently than in Matlab/Octave.
template<typename eT >
arma_warn_unused eT min (const Row< eT > &A)
 Immediate 'find the minimum value in a row vector' operation.
template<typename eT >
arma_warn_unused eT min (const Col< eT > &A)
 Immediate 'find the minimum value in a column vector'.
template<typename T1 >
arma_warn_unused T1::elem_type min (const Op< T1, op_min > &in)
 //! Immediate 'find minimum value' operation, //! invoked, for example, by: min(min(A))
template<typename T1 >
const Op< Op< T1, op_min >
, op_min
min (const Op< T1, op_min > &in, const u32 dim)
template<typename eT >
arma_warn_unused eT min (const subview_row< eT > &A)
template<typename eT >
arma_warn_unused eT min (const subview_col< eT > &A)
template<typename eT >
arma_warn_unused eT min (const diagview< eT > &A)
template<typename eT >
arma_warn_unused eT min (const Op< subview< eT >, op_min > &in)

Detailed Description

//!


Function Documentation

template<typename T1 >
arma_inline const Op<T1, op_min> min ( const Base< typename T1::elem_type, T1 > &  X,
const u32  dim = 0 
)

//! Delayed 'minimum values' operation. //! The dimension, along which the minima 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. //! NOTE: This function works differently than in Matlab/Octave.

Definition at line 31 of file fn_min.hpp.

References Base< elem_type, derived >::get_ref().

Referenced by Row< eT >::copy_size(), Col< eT >::copy_size(), Math< eT >::log_min(), Row< eT >::ones(), Col< eT >::ones(), Row< eT >::set_size(), Col< eT >::set_size(), auxlib::svd(), Row< eT >::zeros(), and Col< eT >::zeros().

  {
  arma_extra_debug_sigprint();
  
  return Op<T1, op_min>(X.get_ref(), dim, 0);
  }

template<typename eT >
arma_warn_unused eT min ( const Row< eT > &  A  )  [inline]

Immediate 'find the minimum value in a row vector' operation.

Definition at line 44 of file fn_min.hpp.

References op_min::direct_min(), Mat< eT >::mem, and Mat< eT >::n_elem.

  {
  arma_extra_debug_sigprint();
  
  arma_debug_check( (A.n_elem == 0), "min(): given vector has no elements" );
  
  return op_min::direct_min(A.mem, A.n_elem);
  }

template<typename eT >
arma_warn_unused eT min ( const Col< eT > &  A  )  [inline]

Immediate 'find the minimum value in a column vector'.

Definition at line 60 of file fn_min.hpp.

References op_min::direct_min(), Mat< eT >::mem, and Mat< eT >::n_elem.

  {
  arma_extra_debug_sigprint();
  
  arma_debug_check( (A.n_elem == 0), "min(): given vector has no elements" );
  
  return op_min::direct_min(A.mem, A.n_elem);
  }

template<typename T1 >
arma_warn_unused T1::elem_type min ( const Op< T1, op_min > &  in  )  [inline]

//! Immediate 'find minimum value' operation, //! invoked, for example, by: min(min(A))

Definition at line 78 of file fn_min.hpp.

References op_min::direct_min(), unwrap< T1 >::M, Op< T1, op_type >::m, Mat< eT >::mem, and Mat< eT >::n_elem.

  {
  arma_extra_debug_sigprint();
  arma_extra_debug_print("min(): two consecutive min() calls detected");
  
  typedef typename T1::elem_type eT;
  
  const unwrap<T1> tmp1(in.m);
  const Mat<eT>& X = tmp1.M;
  
  arma_debug_check( (X.n_elem == 0), "min(): given matrix has no elements" );
  
  return op_min::direct_min(X.mem, X.n_elem);
  }

template<typename T1 >
const Op< Op<T1, op_min>, op_min> min ( const Op< T1, op_min > &  in,
const u32  dim 
) [inline]

Definition at line 98 of file fn_min.hpp.

  {
  arma_extra_debug_sigprint();
  
  return Op< Op<T1, op_min>, op_min>(in, dim, 0);
  }

template<typename eT >
arma_warn_unused eT min ( const subview_row< eT > &  A  )  [inline]

Definition at line 111 of file fn_min.hpp.

References op_min::direct_min(), and subview< eT >::n_elem.

  {
  arma_extra_debug_sigprint();
  
  arma_debug_check( (A.n_elem == 0), "min(): given vector has no elements" );
  
  return op_min::direct_min(A);
  }

template<typename eT >
arma_warn_unused eT min ( const subview_col< eT > &  A  )  [inline]

Definition at line 126 of file fn_min.hpp.

References op_min::direct_min(), and subview< eT >::n_elem.

  {
  arma_extra_debug_sigprint();
  
  arma_debug_check( (A.n_elem == 0), "min(): given vector has no elements" );
  
  return op_min::direct_min(A);
  }

template<typename eT >
arma_warn_unused eT min ( const diagview< eT > &  A  )  [inline]

Definition at line 141 of file fn_min.hpp.

References op_min::direct_min(), and diagview< eT >::n_elem.

  {
  arma_extra_debug_sigprint();
  
  arma_debug_check( (A.n_elem == 0), "min(): given vector has no elements" );
  
  return op_min::direct_min(A);
  }

template<typename eT >
arma_warn_unused eT min ( const Op< subview< eT >, op_min > &  in  )  [inline]

Definition at line 156 of file fn_min.hpp.

References op_min::direct_min(), and subview< eT >::n_elem.

  {
  arma_extra_debug_sigprint();
  arma_extra_debug_print("max(): two consecutive max() calls detected");
  
  const subview<eT>& X = in.m;
  
  arma_debug_check( (X.n_elem == 0), "max(): given matrix has no elements" );
  
  return op_min::direct_min(X);
  }