small class for storing min and max.
More...
#include <MinMax.h>
|
| MinMax () |
| constructor, starts with max for min and min for max (will later be replaced by valid entries).
|
|
void | reset () |
| reset to start values.
|
|
bool | checkAndReplaceIfMinMax (double newVal) |
| checks value and replaces old ones if new one is better.
|
|
double | getMin () const |
| returns smallest value stored so far.
|
|
double | getMax () const |
| returns biggest value stored so far.
|
|
std::string | print () const |
| print function returning results for min and max as a string.
|
|
|
std::pair< double, double > | m_minMax |
| .first is min, .second is .max.
|
|
small class for storing min and max.
Definition at line 23 of file MinMax.h.
◆ MinMax()
constructor, starts with max for min and min for max (will later be replaced by valid entries).
Definition at line 29 of file MinMax.h.
29 :
30 m_minMax({std::numeric_limits< double >::max(), -std::numeric_limits< double >::max()}) {}
std::pair< double, double > m_minMax
.first is min, .second is .max.
◆ checkAndReplaceIfMinMax()
bool checkAndReplaceIfMinMax |
( |
double |
newVal | ) |
|
|
inline |
checks value and replaces old ones if new one is better.
returns true if minMax was updated.
Definition at line 36 of file MinMax.h.
37 {
38 bool wasAdded = false;
41 return wasAdded;
42 }
◆ getMax()
returns biggest value stored so far.
Definition at line 46 of file MinMax.h.
◆ getMin()
returns smallest value stored so far.
Definition at line 44 of file MinMax.h.
◆ print()
std::string print |
( |
| ) |
const |
|
inline |
print function returning results for min and max as a string.
Definition at line 48 of file MinMax.h.
◆ reset()
reset to start values.
Definition at line 33 of file MinMax.h.
33{
m_minMax = {std::numeric_limits< double >::max(), -std::numeric_limits< double >::max()}; }
◆ m_minMax
std::pair<double, double> m_minMax |
|
protected |
.first is min, .second is .max.
Definition at line 25 of file MinMax.h.
The documentation for this class was generated from the following file:
- tracking/trackFindingVXD/sectorMapTools/include/MinMax.h