35 #ifndef _BLAZE_MATH_EXPRESSIONS_DVECVAREXPR_H_ 36 #define _BLAZE_MATH_EXPRESSIONS_DVECVAREXPR_H_ 75 decltype(
auto) var_backend( const DenseVector<VT,TF>& dv,
FalseType )
77 using BT = UnderlyingBuiltin_t<VT>;
79 const size_t n(
size( ~dv ) );
83 const auto m( uniform<TF>( n,
mean( ~dv ) ) );
85 return sum(
map( (~dv) - m, Pow2() ) ) *
inv( BT( n-1UL ) );
101 decltype(
auto) var_backend( const DenseVector<VT,TF>& dv,
TrueType )
107 return ElementType_t<VT>();
134 template<
typename VT
140 const size_t n(
size( ~dv ) );
BoolConstant< false > FalseType
Type/value traits base class.The FalseType class is used as base class for type traits and value trai...
Definition: IntegralConstant.h:121
#define BLAZE_THROW_INVALID_ARGUMENT(MESSAGE)
Macro for the emission of a std::invalid_argument exception.This macro encapsulates the default way o...
Definition: Exception.h:235
Header file for basic type definitions.
Header file for the Pow2 functor.
Header file for the DenseVector base class.
Header file for the MAYBE_UNUSED function template.
Header file for the invert shim.
BoolConstant< true > TrueType
Type traits base class.The TrueType class is used as base class for type traits and value traits that...
Definition: IntegralConstant.h:132
Namespace of the Blaze C++ math library.
Definition: Blaze.h:58
Header file for the UnderlyingBuiltin type trait.
decltype(auto) sum(const DenseMatrix< MT, SO > &dm)
Reduces the given dense matrix by means of addition.
Definition: DMatReduceExpr.h:2147
decltype(auto) inv(const DenseMatrix< MT, SO > &dm)
Calculation of the inverse of the given dense matrix.
Definition: DMatInvExpr.h:423
Base class for N-dimensional dense vectors.The DenseVector class is a base class for all arbitrarily ...
Definition: DenseVector.h:76
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition: MaybeUnused.h:81
Header file for the exception macros of the math module.
decltype(auto) mean(const DenseMatrix< MT, SO > &dm)
Computes the (arithmetic) mean for the given dense matrix.
Definition: DMatMeanExpr.h:134
Header file for run time assertion macros.
decltype(auto) var(const DenseMatrix< MT, SO > &dm)
Computes the variance for the given dense matrix.
Definition: DMatVarExpr.h:137
#define BLAZE_FUNCTION_TRACE
Function trace macro.This macro can be used to reliably trace function calls. In case function tracin...
Definition: FunctionTrace.h:94
constexpr size_t size(const Matrix< MT, SO > &matrix) noexcept
Returns the total number of elements of the matrix.
Definition: Matrix.h:530
Header file for the IntegralConstant class template.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression,...
Definition: Assert.h:101
Header file for the function trace functionality.
decltype(auto) map(const DenseMatrix< MT1, SO > &lhs, const DenseMatrix< MT2, SO > &rhs, OP op)
Evaluates the given binary operation on each single element of the dense matrices lhs and rhs.
Definition: DMatDMatMapExpr.h:1121