HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::math::Extrema Class Reference

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

#include <Stats.h>

+ Inheritance diagram for openvdb::OPENVDB_VERSION_NAME::math::Extrema:

Public Member Functions

 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...
 

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.

Definition at line 105 of file Stats.h.

Constructor & Destructor Documentation

openvdb::OPENVDB_VERSION_NAME::math::Extrema::Extrema ( )
inline

Constructor.

Warning
The min/max values are initiated to extreme values

Definition at line 111 of file Stats.h.

Member Function Documentation

void openvdb::OPENVDB_VERSION_NAME::math::Extrema::add ( double  val)
inline

Add a single sample.

Definition at line 119 of file Stats.h.

void openvdb::OPENVDB_VERSION_NAME::math::Extrema::add ( double  val,
uint64_t  n 
)
inline

Add n samples with constant value val.

Definition at line 127 of file Stats.h.

void openvdb::OPENVDB_VERSION_NAME::math::Extrema::add ( const Extrema other)
inline

Add the samples from the other Stats instance.

Definition at line 147 of file Stats.h.

void openvdb::OPENVDB_VERSION_NAME::math::Extrema::join ( const Extrema other)
inlineprotected

Definition at line 174 of file Stats.h.

double openvdb::OPENVDB_VERSION_NAME::math::Extrema::max ( ) const
inline

Return the maximum value.

Definition at line 141 of file Stats.h.

double openvdb::OPENVDB_VERSION_NAME::math::Extrema::min ( ) const
inline

Return the minimum value.

Definition at line 138 of file Stats.h.

void openvdb::OPENVDB_VERSION_NAME::math::Extrema::print ( const std::string name = "",
std::ostream &  strm = std::cout,
int  precision = 3 
) const
inline

Print extrema to the specified output stream.

Definition at line 153 of file Stats.h.

double openvdb::OPENVDB_VERSION_NAME::math::Extrema::range ( ) const
inline

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

Definition at line 144 of file Stats.h.

uint64_t openvdb::OPENVDB_VERSION_NAME::math::Extrema::size ( void  ) const
inline

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

Definition at line 135 of file Stats.h.

Member Data Documentation

double openvdb::OPENVDB_VERSION_NAME::math::Extrema::mMax
protected

Definition at line 183 of file Stats.h.

double openvdb::OPENVDB_VERSION_NAME::math::Extrema::mMin
protected

Definition at line 183 of file Stats.h.

uint64_t openvdb::OPENVDB_VERSION_NAME::math::Extrema::mSize
protected

Definition at line 182 of file Stats.h.


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