HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 (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 56 of file Stats.h.

Constructor & Destructor Documentation

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 61 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 66 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 79 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 76 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 73 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 86 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 100 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 100 of file Stats.h.


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