Blaze 3.9
DVecStdDevExpr.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_MATH_EXPRESSIONS_DVECSTDDEVEXPR_H_
36#define _BLAZE_MATH_EXPRESSIONS_DVECSTDDEVEXPR_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
47
48
49namespace blaze {
50
51//=================================================================================================
52//
53// GLOBAL FUNCTIONS
54//
55//=================================================================================================
56
57//*************************************************************************************************
79template< typename VT // Type of the dense vector
80 , bool TF > // Transpose flag
81decltype(auto) stddev( const DenseVector<VT,TF>& dv )
82{
84
85 return sqrt( var( *dv ) );
86}
87//*************************************************************************************************
88
89} // namespace blaze
90
91#endif
Header file for the dense vector map expression.
Header file for the dense vector variance expression.
Header file for the function trace functionality.
Base class for N-dimensional dense vectors.
Definition: DenseVector.h:77
Header file for the DenseVector base class.
decltype(auto) var(const DenseMatrix< MT, SO > &dm)
Computes the variance for the given dense matrix.
Definition: DMatVarExpr.h:138
decltype(auto) sqrt(const DenseMatrix< MT, SO > &dm)
Computes the square root of each single element of the dense matrix dm.
Definition: DMatMapExpr.h:1616
decltype(auto) stddev(const DenseVector< VT, TF > &dv)
Computes the standard deviation for the given dense vector.
Definition: DVecStdDevExpr.h:81
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition: FunctionTrace.h:94