NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
|
Simplify the creation of some statistics by externalizing the operation code and unifying the driver code. More...
#include <statslogic.hpp>
Public Types | |
enum | OperationType { OPERATION_ADD , OPERATION_MULT , OPERATION_ADDSQ , OPERATION_ADDSQSUB , OPERATION_MAX , OPERATION_MIN , OPERATION_NUM } |
Public Member Functions | |
StatsLogic (OperationType type, double baseVal=0.0, mu::value_type compVal=0.0) | |
void | operator() (const mu::value_type &newVal) |
Implements the statistics logic. More... | |
void | combine (const StatsLogic &other) |
Combines results from different StatsLogic instances into a single result. More... | |
Public Attributes | |
mu::value_type | m_val |
mu::value_type | m_compval |
OperationType | m_type |
Simplify the creation of some statistics by externalizing the operation code and unifying the driver code.
Definition at line 29 of file statslogic.hpp.
Enumerator | |
---|---|
OPERATION_ADD | |
OPERATION_MULT | |
OPERATION_ADDSQ | |
OPERATION_ADDSQSUB | |
OPERATION_MAX | |
OPERATION_MIN | |
OPERATION_NUM |
Definition at line 31 of file statslogic.hpp.
|
inline |
Definition at line 46 of file statslogic.hpp.
|
inline |
Combines results from different StatsLogic instances into a single result.
other | const StatsLogic& |
Definition at line 95 of file statslogic.hpp.
References mu::isnan(), m_type, m_val, OPERATION_ADD, OPERATION_ADDSQ, OPERATION_ADDSQSUB, OPERATION_MAX, OPERATION_MIN, OPERATION_MULT, and OPERATION_NUM.
|
inline |
Implements the statistics logic.
newVal | const mu::value_type& |
Definition at line 56 of file statslogic.hpp.
References mu::isnan(), m_compval, m_type, m_val, OPERATION_ADD, OPERATION_ADDSQ, OPERATION_ADDSQSUB, OPERATION_MAX, OPERATION_MIN, OPERATION_MULT, and OPERATION_NUM.
mu::value_type StatsLogic::m_compval |
Definition at line 43 of file statslogic.hpp.
Referenced by operator()().
OperationType StatsLogic::m_type |
Definition at line 44 of file statslogic.hpp.
Referenced by combine(), and operator()().
mu::value_type StatsLogic::m_val |
Definition at line 42 of file statslogic.hpp.
Referenced by combine(), and operator()().