diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2021-01-10 19:07:29 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2021-01-10 13:42:48 -0800 |
commit | 0efcbb0eb6e7711c14779140c6198a43a3a09806 (patch) | |
tree | 2c3ea582e5e3e2059077df62e255a2c30db855f2 /stats/statsvariables.h | |
parent | bd26d8407f28186c9db86e96260bd51f25e07f01 (diff) | |
download | subsurface-0efcbb0eb6e7711c14779140c6198a43a3a09806.tar.gz |
statistics: add min and max operations for numerical types
This makes sense and is easy to implement.
Suggested-by: Peter Zaal <peter.zaal@gmail.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'stats/statsvariables.h')
-rw-r--r-- | stats/statsvariables.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/stats/statsvariables.h b/stats/statsvariables.h index 06fb90f2a..964878550 100644 --- a/stats/statsvariables.h +++ b/stats/statsvariables.h @@ -26,6 +26,8 @@ enum class StatsOperation : int { Mean, TimeWeightedMean, Sum, + Min, + Max, Invalid }; @@ -36,6 +38,8 @@ struct StatsOperationResults { double mean; double timeWeightedMean; double sum; + double min; + double max; StatsOperationResults(); // Initialize to invalid (e.g. no dives) bool isValid() const; double get(StatsOperation op) const; |