Blaze
3.9
Toggle main menu visibility
Loading...
Searching...
No Matches
blaze
math
expressions
SMatStdDevExpr.h
Go to the documentation of this file.
1
//=================================================================================================
33
//=================================================================================================
34
35
#ifndef _BLAZE_MATH_EXPRESSIONS_SMATSTDDEVEXPR_H_
36
#define _BLAZE_MATH_EXPRESSIONS_SMATSTDDEVEXPR_H_
37
38
39
//*************************************************************************************************
40
// Includes
41
//*************************************************************************************************
42
43
#include <
blaze/math/expressions/SparseMatrix.h
>
44
#include <
blaze/math/expressions/SMatMapExpr.h
>
45
#include <
blaze/math/expressions/SMatVarExpr.h
>
46
#include <
blaze/util/FunctionTrace.h
>
47
48
49
namespace
blaze {
50
51
//=================================================================================================
52
//
53
// GLOBAL FUNCTIONS
54
//
55
//=================================================================================================
56
57
//*************************************************************************************************
82
template
<
typename
MT
// Type of the sparse matrix
83
,
bool
SO >
// Storage order
84
inline
decltype
(
auto
)
stddev
(
const
SparseMatrix<MT,SO>
& sm )
85
{
86
BLAZE_FUNCTION_TRACE
;
87
88
return
sqrt
(
var
( *sm ) );
89
}
90
//*************************************************************************************************
91
92
93
//*************************************************************************************************
130
template
< ReductionFlag RF
// Reduction flag
131
,
typename
MT
// Type of the sparse matrix
132
,
bool
SO >
// Storage order
133
inline
decltype
(
auto
)
stddev
(
const
SparseMatrix<MT,SO>
& sm )
134
{
135
BLAZE_FUNCTION_TRACE
;
136
137
return
sqrt
(
var<RF>
( *sm ) );
138
}
139
//*************************************************************************************************
140
141
}
// namespace blaze
142
143
#endif
FunctionTrace.h
Header file for the function trace functionality.
SMatMapExpr.h
Header file for the sparse matrix map expression.
SMatVarExpr.h
Header file for the sparse matrix variance expression.
blaze::SparseMatrix
Base class for sparse matrices.
Definition
SparseMatrix.h:77
SparseMatrix.h
Header file for the SparseMatrix base class.
blaze::stddev
decltype(auto) stddev(const DenseMatrix< MT, SO > &dm)
Computes the standard deviation for the given dense matrix.
Definition
DMatStdDevExpr.h:83
blaze::var
decltype(auto) var(const DenseMatrix< MT, SO > &dm)
Computes the variance for the given dense matrix.
Definition
DMatVarExpr.h:138
blaze::sqrt
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
BLAZE_FUNCTION_TRACE
#define BLAZE_FUNCTION_TRACE
Function trace macro.
Definition
FunctionTrace.h:94
Generated by
1.18.0