Fn_stddev

Functions

template<typename T1 >
Mat< typename T1::pod_type > stddev (const Base< typename T1::elem_type, T1 > &X, const u32 norm_type=0, const u32 dim=0)
template<typename eT >
arma_warn_unused get_pod_type
< eT >::result 
stddev (const Row< eT > &A, const u32 norm_type=0)
 Immediate 'find the standard deviation of a row vector' operation.
template<typename eT >
arma_warn_unused get_pod_type
< eT >::result 
stddev (const Col< eT > &A, const u32 norm_type=0)
 Immediate 'find the standard deviation of a column vector' operation.
template<typename eT >
arma_warn_unused get_pod_type
< eT >::result 
stddev (const subview_row< eT > &A, const u32 norm_type=0)
 find the standard deviation of a subview_row
template<typename eT >
arma_warn_unused get_pod_type
< eT >::result 
stddev (const subview_col< eT > &A, const u32 norm_type=0)
 find the standard deviation of a subview_col
template<typename eT >
arma_warn_unused get_pod_type
< eT >::result 
stddev (const diagview< eT > &A, const u32 norm_type=0)
 find the standard deviation of a diagview

Function Documentation

template<typename T1 >
Mat<typename T1::pod_type> stddev ( const Base< typename T1::elem_type, T1 > &  X,
const u32  norm_type = 0,
const u32  dim = 0 
) [inline]

Definition at line 25 of file fn_stddev.hpp.

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

Referenced by op_cor::direct_cor(), and glue_cor::direct_cor().

00026   {
00027   arma_extra_debug_sigprint();
00028   
00029   typedef typename T1::elem_type  in_eT;
00030   typedef typename T1::pod_type  out_eT;
00031 
00032   const unwrap<T1>      tmp(X.get_ref());
00033   const Mat<in_eT>& A = tmp.M;
00034   
00035   Mat<out_eT> out;
00036   
00037   op_stddev::apply(out, A, norm_type, dim);
00038   
00039   return out;
00040   }

template<typename eT >
arma_warn_unused get_pod_type<eT>::result stddev ( const Row< eT > &  A,
const u32  norm_type = 0 
) [inline]

Immediate 'find the standard deviation of a row vector' operation.

Definition at line 49 of file fn_stddev.hpp.

References op_var::direct_var(), Mat< eT >::mem, Mat< eT >::n_elem, and sqrt().

00050   {
00051   arma_extra_debug_sigprint();
00052   
00053   arma_debug_check( (A.n_elem == 0), "stddev(): given vector has no elements" );
00054   
00055   return std::sqrt( op_var::direct_var(A.mem, A.n_elem, norm_type) );
00056   }

template<typename eT >
arma_warn_unused get_pod_type<eT>::result stddev ( const Col< eT > &  A,
const u32  norm_type = 0 
) [inline]

Immediate 'find the standard deviation of a column vector' operation.

Definition at line 65 of file fn_stddev.hpp.

References op_var::direct_var(), Mat< eT >::mem, Mat< eT >::n_elem, and sqrt().

00066   {
00067   arma_extra_debug_sigprint();
00068   
00069   arma_debug_check( (A.n_elem == 0), "stddev(): given vector has no elements" );
00070   
00071   return std::sqrt( op_var::direct_var(A.mem, A.n_elem, norm_type) );
00072   }

template<typename eT >
arma_warn_unused get_pod_type<eT>::result stddev ( const subview_row< eT > &  A,
const u32  norm_type = 0 
) [inline]

find the standard deviation of a subview_row

Definition at line 81 of file fn_stddev.hpp.

References op_var::direct_var(), subview< eT >::n_elem, and sqrt().

00082   {
00083   arma_extra_debug_sigprint();
00084   
00085   arma_debug_check( (A.n_elem == 0), "stddev(): given vector has no elements" );
00086   
00087   return std::sqrt( op_var::direct_var(A, norm_type) );
00088   }

template<typename eT >
arma_warn_unused get_pod_type<eT>::result stddev ( const subview_col< eT > &  A,
const u32  norm_type = 0 
) [inline]

find the standard deviation of a subview_col

Definition at line 97 of file fn_stddev.hpp.

References op_var::direct_var(), subview< eT >::n_elem, and sqrt().

00098   {
00099   arma_extra_debug_sigprint();
00100   
00101   arma_debug_check( (A.n_elem == 0), "stddev(): given vector has no elements" );
00102   
00103   return std::sqrt( op_var::direct_var(A, norm_type) );
00104   }

template<typename eT >
arma_warn_unused get_pod_type<eT>::result stddev ( const diagview< eT > &  A,
const u32  norm_type = 0 
) [inline]

find the standard deviation of a diagview

Definition at line 113 of file fn_stddev.hpp.

References op_var::direct_var(), diagview< eT >::n_elem, and sqrt().

00114   {
00115   arma_extra_debug_sigprint();
00116   
00117   arma_debug_check( (A.n_elem == 0), "stddev(): given vector has no elements" );
00118   
00119   return std::sqrt( op_var::direct_var(A, norm_type) );
00120   }