Mesh Oriented datABase  (version 5.4.1)
Array-based unstructured mesh datastructure
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 ( ) [inline]

Definition at line 75 of file size.cpp.

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

Member Function Documentation

void stat_set::add ( double  val) [inline]

Definition at line 77 of file size.cpp.

References moab::sum().

Referenced by gather_set_stats().

    {
        if( val < min ) min = val;
        if( val > max ) max = val;
        sum += val;
        sqr += val * val;
        ++count;
    }
void stat_set::add ( const stat_set stats) [inline]

Definition at line 86 of file size.cpp.

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

    {
        if( stats.min < min ) min = stats.min;
        if( stats.max > max ) max = stats.max;
        sum += stats.sum;
        sqr += stats.sqr;
        count += stats.count;
    }
void stat_set::clear ( ) [inline]

Definition at line 95 of file size.cpp.

References moab::sum().

    {
        sum = sqr = 0.0;
        max = count = 0;
        min         = HUGE_VAL;
    }

Member Data Documentation

Definition at line 73 of file size.cpp.

Referenced by add(), and print_stats().

double stat_set::max

Definition at line 72 of file size.cpp.

Referenced by add(), and print_stats().

double stat_set::min

Definition at line 71 of file size.cpp.

Referenced by add(), and print_stats().

double stat_set::sqr

Definition at line 70 of file size.cpp.

Referenced by add(), and print_stats().

double stat_set::sum

Definition at line 69 of file size.cpp.

Referenced by add(), and print_stats().

List of all members.


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