Loading...
Searching...
No Matches
MinMax< ValueType, Less > Class Template Reference

Templated class to compute the minimum and maximum values. More...

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

## Public Member Functions

| MinMax ()
| Empty constructor.
| MinMax (const ValueType &min, const ValueType &max)
| Constructor.
void | add (const ValueType &val, const Less &less=Less())
| Add a single sample.
const ValueType & | min () const
| Return the minimum value.
const ValueType & | max () const
| Return the maximum value.
void | add (const MinMax &other, const Less &less=Less())
| Add the samples from the other Stats instance.
void | print (const std::string &name="", std::ostream &strm=std::cout, int precision=3) const
| Print MinMax to the specified output stream.

## Protected Attributes

ValueType | mMin
ValueType | mMax

## Detailed Description

template<typename ValueType, typename Less = std::less<ValueType>>
class openvdb::v11_0::math::MinMax< ValueType, Less >

Templated class to compute the minimum and maximum values.

## Constructor & Destructor Documentation

## MinMax() [1/2]

template<typename ValueType, typename Less = std::less<ValueType>>

MinMax | ( |  | ) |

inline

Empty constructor.

Warning
  Only use this constructor with POD types

## MinMax() [2/2]

template<typename ValueType, typename Less = std::less<ValueType>>

MinMax | ( | const ValueType & | min,
|  | const ValueType & | max )

inline

Constructor.

## Member Function Documentation

## add() [1/2]

template<typename ValueType, typename Less = std::less<ValueType>>

void add | ( | const MinMax< ValueType, Less > & | other,
|  | const Less & | less = Less() )

inline

Add the samples from the other Stats instance.

## add() [2/2]

template<typename ValueType, typename Less = std::less<ValueType>>

void add | ( | const ValueType & | val,
|  | const Less & | less = Less() )

inline

Add a single sample.

## max()

template<typename ValueType, typename Less = std::less<ValueType>>

const ValueType & max | ( |  | ) | const

inline

Return the maximum value.

## min()

template<typename ValueType, typename Less = std::less<ValueType>>

const ValueType & min | ( |  | ) | const

inline

Return the minimum value.

## print()

template<typename ValueType, typename Less = std::less<ValueType>>

void print | ( | const std::string & | name = "",
|  | std::ostream & | strm = std::cout,
|  | int | precision = 3 ) const

inline

Print MinMax to the specified output stream.

## Member Data Documentation

## mMax

template<typename ValueType, typename Less = std::less<ValueType>>

ValueType mMax

protected

## mMin

template<typename ValueType, typename Less = std::less<ValueType>>

ValueType mMin

protected