moab
moab::StatData::Stat< T > Struct Template Reference

List of all members.

Public Member Functions

 Stat ()
void accum (T v)

Public Attributes

T min
T max
double sum
double sqr

Detailed Description

template<typename T>
struct moab::StatData::Stat< T >

Definition at line 2058 of file OrientedBoxTreeTool.cpp.


Constructor & Destructor Documentation

template<typename T>
moab::StatData::Stat< T >::Stat ( ) [inline]

Definition at line 2061 of file OrientedBoxTreeTool.cpp.

           : sum(0.0), sqr(0.0) {
      std::numeric_limits<T> lim;
      min = lim.max();
      if (lim.is_integer)
        max = lim.min();
      else
        max = -lim.max();
    }

Member Function Documentation

template<typename T>
void moab::StatData::Stat< T >::accum ( T  v) [inline]

Definition at line 2069 of file OrientedBoxTreeTool.cpp.

                      {
      if (v < min) min = v;
      if (v > max) max = v;
      sum += v;
      sqr += (double)v * v;
    }

Member Data Documentation

template<typename T>
T moab::StatData::Stat< T >::max

Definition at line 2059 of file OrientedBoxTreeTool.cpp.

template<typename T>
T moab::StatData::Stat< T >::min

Definition at line 2059 of file OrientedBoxTreeTool.cpp.

template<typename T>
double moab::StatData::Stat< T >::sqr

Definition at line 2060 of file OrientedBoxTreeTool.cpp.

template<typename T>
double moab::StatData::Stat< T >::sum

Definition at line 2060 of file OrientedBoxTreeTool.cpp.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines