Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::StatData::Stat< T > Struct Template Reference
+ Inheritance diagram for moab::StatData::Stat< T >:

Public Member Functions

 Stat ()
 
void accum (T v)
 

Public Attributes

min
 
max
 
double sum
 
double sqr
 

Detailed Description

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

Definition at line 1765 of file OrientedBoxTreeTool.cpp.

Constructor & Destructor Documentation

◆ Stat()

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

Definition at line 1769 of file OrientedBoxTreeTool.cpp.

1769  : sum( 0.0 ), sqr( 0.0 )
1770  {
1771  std::numeric_limits< T > lim;
1772  min = lim.max();
1773  if( lim.is_integer )
1774  max = lim.min();
1775  else
1776  max = -lim.max();
1777  }

Member Function Documentation

◆ accum()

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

Definition at line 1778 of file OrientedBoxTreeTool.cpp.

1779  {
1780  if( v < min ) min = v;
1781  if( v > max ) max = v;
1782  sum += v;
1783  sqr += (double)v * v;
1784  }

References moab::sum().

Referenced by moab::OrientedBoxTreeTool::recursive_stats().

Member Data Documentation

◆ max

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

Definition at line 1767 of file OrientedBoxTreeTool.cpp.

Referenced by moab::OrientedBoxTreeTool::stats().

◆ min

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

Definition at line 1767 of file OrientedBoxTreeTool.cpp.

Referenced by moab::OrientedBoxTreeTool::stats().

◆ sqr

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

Definition at line 1768 of file OrientedBoxTreeTool.cpp.

Referenced by moab::OrientedBoxTreeTool::stats().

◆ sum

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

Definition at line 1768 of file OrientedBoxTreeTool.cpp.

Referenced by moab::OrientedBoxTreeTool::stats().


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