Mesh Oriented datABase  (version 5.5.1)
An array-based unstructured mesh library
stat_set Struct Reference

Public Member Functions

 stat_set ()
 
void add (double val)
 
void add (const stat_set &stats)
 
void clear ()
 

Public Attributes

double sum
 
double sqr
 
double min
 
double max
 
long count
 

Detailed Description

Definition at line 67 of file size.cpp.

Constructor & Destructor Documentation

◆ stat_set()

stat_set::stat_set ( )
inline

Definition at line 75 of file size.cpp.

75 : sum( 0 ), sqr( 0 ), min( HUGE_VAL ), max( 0 ), count( 0 ) {}

Member Function Documentation

◆ add() [1/2]

void stat_set::add ( const stat_set stats)
inline

Definition at line 86 of file size.cpp.

87  {
88  if( stats.min < min ) min = stats.min;
89  if( stats.max > max ) max = stats.max;
90  sum += stats.sum;
91  sqr += stats.sqr;
92  count += stats.count;
93  }

References count, max, min, sqr, moab::sum(), and sum.

◆ add() [2/2]

void stat_set::add ( double  val)
inline

Definition at line 77 of file size.cpp.

78  {
79  if( val < min ) min = val;
80  if( val > max ) max = val;
81  sum += val;
82  sqr += val * val;
83  ++count;
84  }

References moab::sum().

Referenced by set_stats::add(), and gather_set_stats().

◆ clear()

void stat_set::clear ( )
inline

Definition at line 95 of file size.cpp.

96  {
97  sum = sqr = 0.0;
98  max = count = 0;
99  min = HUGE_VAL;
100  }

References moab::sum().

Referenced by set_stats::clear().

Member Data Documentation

◆ count

long stat_set::count

Definition at line 73 of file size.cpp.

Referenced by add(), and print_stats().

◆ max

double stat_set::max

Definition at line 72 of file size.cpp.

Referenced by add(), and print_stats().

◆ min

double stat_set::min

Definition at line 71 of file size.cpp.

Referenced by add(), and print_stats().

◆ sqr

double stat_set::sqr

Definition at line 70 of file size.cpp.

Referenced by add(), and print_stats().

◆ sum

double stat_set::sum

Definition at line 69 of file size.cpp.

Referenced by add(), and print_stats().


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