Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
moab::StatData::Ratio Struct Reference

Public Member Functions

 Ratio ()
 
void accum (double v)
 

Public Attributes

double min
 
double max
 
double sum
 
double sqr
 
int hist [10]
 

Detailed Description

Definition at line 1739 of file OrientedBoxTreeTool.cpp.

Constructor & Destructor Documentation

◆ Ratio()

moab::StatData::Ratio::Ratio ( )
inline

Definition at line 1743 of file OrientedBoxTreeTool.cpp.

1744  : min( std::numeric_limits< double >::max() ), max( -std::numeric_limits< double >::max() ), sum( 0.0 ),
1745  sqr( 0.0 )
1746  {
1747  hist[0] = hist[1] = hist[2] = hist[3] = hist[4] = hist[5] = hist[6] = hist[7] = hist[8] = hist[9] = 0;
1748  }

Member Function Documentation

◆ accum()

void moab::StatData::Ratio::accum ( double  v)
inline

Definition at line 1749 of file OrientedBoxTreeTool.cpp.

1750  {
1751  if( v < min ) min = v;
1752  if( v > max ) max = v;
1753  sum += v;
1754  sqr += v * v;
1755  int i = (int)( 10 * v );
1756  if( i < 0 )
1757  i = 0;
1758  else if( i > 9 )
1759  i = 9;
1760  ++hist[i];
1761  }

References moab::sum().

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

Member Data Documentation

◆ hist

int moab::StatData::Ratio::hist[10]

Definition at line 1742 of file OrientedBoxTreeTool.cpp.

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

◆ max

double moab::StatData::Ratio::max

Definition at line 1741 of file OrientedBoxTreeTool.cpp.

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

◆ min

double moab::StatData::Ratio::min

Definition at line 1741 of file OrientedBoxTreeTool.cpp.

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

◆ sqr

double moab::StatData::Ratio::sqr

Definition at line 1741 of file OrientedBoxTreeTool.cpp.

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

◆ sum

double moab::StatData::Ratio::sum

Definition at line 1741 of file OrientedBoxTreeTool.cpp.

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


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