MOAB: Mesh Oriented datABase  (version 5.4.1)
SimpleStat< T > Struct Template Reference

Public Member Functions

 SimpleStat ()
void add (T value)
double avg () const
double rms () const
double dev () const

Public Attributes

T min
T max
T sum
T sqr
size_t count

Detailed Description

template<typename T>
struct SimpleStat< T >

Definition at line 384 of file obb_tree_tool.cpp.


Constructor & Destructor Documentation

template<typename T >
SimpleStat< T >::SimpleStat ( )

Member Function Documentation

template<typename T >
void SimpleStat< T >::add ( T  value)
template<typename T >
double SimpleStat< T >::avg ( ) const [inline]

Definition at line 390 of file obb_tree_tool.cpp.

References moab::SimpleStat< T >::count, and moab::SimpleStat< T >::sum.

    {
        return (double)sum / count;
    }
template<typename T >
double SimpleStat< T >::dev ( ) const [inline]

Definition at line 398 of file obb_tree_tool.cpp.

References moab::SimpleStat< T >::count, moab::SimpleStat< T >::sqr, and moab::SimpleStat< T >::sum.

    {
        return sqrt( ( count * (double)sqr - (double)sum * (double)sum ) / ( (double)count * ( count - 1 ) ) );
    }
template<typename T >
double SimpleStat< T >::rms ( ) const [inline]

Definition at line 394 of file obb_tree_tool.cpp.

References moab::SimpleStat< T >::count, and moab::SimpleStat< T >::sqr.

    {
        return sqrt( (double)sqr / count );
    }

Member Data Documentation

template<typename T >
size_t SimpleStat< T >::count

Definition at line 387 of file obb_tree_tool.cpp.

template<typename T >
T SimpleStat< T >::max

Definition at line 386 of file obb_tree_tool.cpp.

template<typename T >
T SimpleStat< T >::min

Definition at line 386 of file obb_tree_tool.cpp.

template<typename T >
T SimpleStat< T >::sqr

Definition at line 386 of file obb_tree_tool.cpp.

template<typename T >
T SimpleStat< T >::sum

Definition at line 386 of file obb_tree_tool.cpp.

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