This class computes the minimum and maximum values of a population of floating-point values.
More...
#include <openvdb/math/Stats.h>
|
| Extrema () |
| Constructor. More...
|
|
void | add (double val) |
| Add a single sample. More...
|
|
void | add (double val, uint64_t n) |
| Add n samples with constant value val. More...
|
|
uint64_t | size () const |
| Return the size of the population, i.e., the total number of samples. More...
|
|
double | min () const |
| Return the minimum value. More...
|
|
double | max () const |
| Return the maximum value. More...
|
|
double | range () const |
| Return the range defined as the maximum value minus the minimum value. More...
|
|
void | add (const Extrema &other) |
| Add the samples from the other Stats instance. More...
|
|
void | print (const std::string &name="", std::ostream &strm=std::cout, int precision=3) const |
| Print extrema to the specified output stream. More...
|
|
This class computes the minimum and maximum values of a population of floating-point values.
◆ Extrema()
Constructor.
- Warning
- The min/max values are initiated to extreme values
◆ add() [1/3]
Add the samples from the other Stats instance.
◆ add() [2/3]
◆ add() [3/3]
void add |
( |
double |
val, |
|
|
uint64_t |
n |
|
) |
| |
|
inline |
Add n samples with constant value val.
◆ join()
◆ max()
Return the maximum value.
◆ min()
Return the minimum value.
◆ print()
void print |
( |
const std::string & |
name = "" , |
|
|
std::ostream & |
strm = std::cout , |
|
|
int |
precision = 3 |
|
) |
| const |
|
inline |
Print extrema to the specified output stream.
◆ range()
Return the range defined as the maximum value minus the minimum value.
◆ size()
Return the size of the population, i.e., the total number of samples.
◆ mMax
◆ mMin
◆ mSize