Functions

Fn_diagmat

//! More...

Functions

template<typename T1 >
arma_inline const Op< T1,
op_diagmat
diagmat (const Base< typename T1::elem_type, T1 > &X)
 interpret a matrix or a vector as a diagonal matrix (i.e. off-diagonal entries are zero)

Detailed Description

//!


Function Documentation

template<typename T1 >
arma_inline const Op<T1, op_diagmat> diagmat ( const Base< typename T1::elem_type, T1 > &  X  ) 

interpret a matrix or a vector as a diagonal matrix (i.e. off-diagonal entries are zero)

Definition at line 26 of file fn_diagmat.hpp.

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

Referenced by op_pinv::direct_pinv(), and op_princomp::direct_princomp().

  {
  arma_extra_debug_sigprint();
  
  return Op<T1, op_diagmat>(X.get_ref());
  }