![]() |
Mesh Oriented datABase
(version 5.4.1)
Array-based unstructured mesh datastructure
|
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 |
Definition at line 2093 of file AdaptiveKDTree.cpp.
moab::SimpleStat< T >::SimpleStat | ( | ) |
Definition at line 2116 of file AdaptiveKDTree.cpp.
: min( std::numeric_limits< T >::max() ), max( std::numeric_limits< T >::min() ), sum( 0 ), sqr( 0 ), count( 0 )
{
}
void moab::SimpleStat< T >::add | ( | T | value | ) |
Definition at line 2122 of file AdaptiveKDTree.cpp.
References moab::sum().
Referenced by moab::AdaptiveKDTree::print().
{
if( value < min ) min = value;
if( value > max ) max = value;
sum += value;
sqr += value * value;
++count;
}
double moab::SimpleStat< T >::avg | ( | ) | const [inline] |
Definition at line 2099 of file AdaptiveKDTree.cpp.
References moab::sum().
Referenced by moab::AdaptiveKDTree::print().
{
return (double)sum / count;
}
double moab::SimpleStat< T >::dev | ( | ) | const [inline] |
Definition at line 2107 of file AdaptiveKDTree.cpp.
References moab::sum().
Referenced by moab::AdaptiveKDTree::print().
{
return ( count > 1
? sqrt( ( count * (double)sqr - (double)sum * (double)sum ) / ( (double)count * ( count - 1 ) ) )
: 0.0 );
}
double moab::SimpleStat< T >::rms | ( | ) | const [inline] |
Definition at line 2103 of file AdaptiveKDTree.cpp.
Referenced by moab::AdaptiveKDTree::print().
{
return sqrt( (double)sqr / count );
}
size_t moab::SimpleStat< T >::count |
Definition at line 2096 of file AdaptiveKDTree.cpp.
Referenced by moab::AdaptiveKDTree::print().
T moab::SimpleStat< T >::max |
Definition at line 2095 of file AdaptiveKDTree.cpp.
Referenced by moab::AdaptiveKDTree::print().
T moab::SimpleStat< T >::min |
Definition at line 2095 of file AdaptiveKDTree.cpp.
Referenced by moab::AdaptiveKDTree::print().
T moab::SimpleStat< T >::sqr |
Definition at line 2095 of file AdaptiveKDTree.cpp.
T moab::SimpleStat< T >::sum |
Definition at line 2095 of file AdaptiveKDTree.cpp.
Referenced by moab::AdaptiveKDTree::print().