mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
bd26d8407f
commit
0efcbb0eb6
2 changed files with 23 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue