HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less > Class Template Reference

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

#include <Stats.h>

Public Member Functions

 MinMax ()
 Empty constructor. More...
 
 MinMax (const ValueType &min, const ValueType &max)
 Constructor. More...
 
void add (const ValueType &val, const Less &less=Less())
 Add a single sample. More...
 
const ValueType & min () const
 Return the minimum value. More...
 
const ValueType & max () const
 Return the maximum value. More...
 
void add (const MinMax &other, const Less &less=Less())
 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 MinMax to the specified output stream. More...
 

Protected Attributes

ValueType mMin
 
ValueType mMax
 

Detailed Description

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

Templated class to compute the minimum and maximum values.

Definition at line 30 of file Stats.h.

Constructor & Destructor Documentation

template<typename ValueType, typename Less = std::less<ValueType>>
openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::MinMax ( )
inline

Empty constructor.

Warning
Only use this constructor with POD types

Definition at line 38 of file Stats.h.

template<typename ValueType, typename Less = std::less<ValueType>>
openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::MinMax ( const ValueType &  min,
const ValueType &  max 
)
inline

Constructor.

Definition at line 45 of file Stats.h.

Member Function Documentation

template<typename ValueType, typename Less = std::less<ValueType>>
void openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::add ( const ValueType &  val,
const Less &  less = Less() 
)
inline

Add a single sample.

Definition at line 49 of file Stats.h.

template<typename ValueType, typename Less = std::less<ValueType>>
void openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::add ( const MinMax< ValueType, Less > &  other,
const Less &  less = Less() 
)
inline

Add the samples from the other Stats instance.

Definition at line 62 of file Stats.h.

template<typename ValueType, typename Less = std::less<ValueType>>
const ValueType& openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::max ( ) const
inline

Return the maximum value.

Definition at line 59 of file Stats.h.

template<typename ValueType, typename Less = std::less<ValueType>>
const ValueType& openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::min ( ) const
inline

Return the minimum value.

Definition at line 56 of file Stats.h.

template<typename ValueType, typename Less = std::less<ValueType>>
void openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::print ( const std::string name = "",
std::ostream &  strm = std::cout,
int  precision = 3 
) const
inline

Print MinMax to the specified output stream.

Definition at line 69 of file Stats.h.

Member Data Documentation

template<typename ValueType, typename Less = std::less<ValueType>>
ValueType openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::mMax
protected

Definition at line 83 of file Stats.h.

template<typename ValueType, typename Less = std::less<ValueType>>
ValueType openvdb::OPENVDB_VERSION_NAME::math::MinMax< ValueType, Less >::mMin
protected

Definition at line 83 of file Stats.h.


The documentation for this class was generated from the following file: