OpenVDB 11.0.0

Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Extrema Class Reference

This class computes the minimum and maximum values of a population of floating-point values. More...

`#include <openvdb/math/Stats.h>`

Inheritance diagram for Extrema:

## Public Member Functions
| Extrema ()
| Constructor.
void | add (double val)
| Add a single sample.
void | add (double val, uint64_t n)
| Add n samples with constant value val.
uint64_t | size () const
| Return the size of the population, i.e., the total number of samples.
double | min () const
| Return the minimum value.
double | max () const
| Return the maximum value.
double | range () const
| Return the range defined as the maximum value minus the minimum value.
void | add (const Extrema &other)
| Add the samples from the other Stats instance.
void | print (const std::string &name="", std::ostream &strm=std::cout, int precision=3) const
| Print extrema to the specified output stream.

## Protected Member Functions
void | join (const Extrema &other)

## Protected Attributes
uint64_t | mSize
double | mMin
double | mMax

## Detailed Description

This class computes the minimum and maximum values of a population of floating-point values.

## Constructor & Destructor Documentation

## ◆ Extrema()

Extrema | ( |  | ) |
| inline

Constructor.

Warning
  The min/max values are initiated to extreme values

## Member Function Documentation

## ◆ add() [1/3]

void add | ( | const Extrema & | other | ) |
| inline

Add the samples from the other Stats instance.

## ◆ add() [2/3]

void add | ( | double | val | ) |
| inline

Add a single sample.

## ◆ add() [3/3]

void add | ( | double | val,
|  | uint64_t | n
| ) |  |
| inline

Add n samples with constant value val.

## ◆ join()

void join | ( | const Extrema & | other | ) |
| inline protected

## ◆ max()

double max | ( |  | ) | const
| inline

Return the maximum value.

## ◆ min()

double min | ( |  | ) | const
| inline

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()

double range | ( |  | ) | const
| inline

Return the range defined as the maximum value minus the minimum value.

## ◆ size()

uint64_t size | ( |  | ) | const
| inline

Return the size of the population, i.e., the total number of samples.

## Member Data Documentation

## ◆ mMax

double mMax
| protected

## ◆ mMin

double mMin
| protected

## ◆ mSize

uint64_t mSize
| protected