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 2091 of file AdaptiveKDTree.cpp.
moab::SimpleStat< T >::SimpleStat |
Definition at line 2114 of file AdaptiveKDTree.cpp.
2115 : min( std::numeric_limits< T >::max() ), max( std::numeric_limits< T >::min() ), sum( 0 ), sqr( 0 ), count( 0 )
2116 {
2117 }
void moab::SimpleStat< T >::add | ( | T | value | ) |
Definition at line 2120 of file AdaptiveKDTree.cpp.
2121 {
2122 if( value < min ) min = value;
2123 if( value > max ) max = value;
2124 sum += value;
2125 sqr += value * value;
2126 ++count;
2127 }
References moab::sum().
Referenced by moab::AdaptiveKDTree::print().
|
inline |
Definition at line 2097 of file AdaptiveKDTree.cpp.
2098 {
2099 return (double)sum / count;
2100 }
References moab::SimpleStat< T >::count, and moab::SimpleStat< T >::sum.
Referenced by moab::AdaptiveKDTree::print().
|
inline |
Definition at line 2105 of file AdaptiveKDTree.cpp.
2106 {
2107 return ( count > 1
2108 ? sqrt( ( count * (double)sqr - (double)sum * (double)sum ) / ( (double)count * ( count - 1 ) ) )
2109 : 0.0 );
2110 }
References moab::SimpleStat< T >::count, moab::SimpleStat< T >::sqr, and moab::SimpleStat< T >::sum.
Referenced by moab::AdaptiveKDTree::print().
|
inline |
Definition at line 2101 of file AdaptiveKDTree.cpp.
2102 {
2103 return sqrt( (double)sqr / count );
2104 }
References moab::SimpleStat< T >::count, and moab::SimpleStat< T >::sqr.
Referenced by moab::AdaptiveKDTree::print().
size_t moab::SimpleStat< T >::count |
Definition at line 2094 of file AdaptiveKDTree.cpp.
Referenced by moab::SimpleStat< T >::avg(), moab::SimpleStat< T >::dev(), moab::AdaptiveKDTree::print(), and moab::SimpleStat< T >::rms().
T moab::SimpleStat< T >::max |
Definition at line 2093 of file AdaptiveKDTree.cpp.
Referenced by moab::AdaptiveKDTree::print().
T moab::SimpleStat< T >::min |
Definition at line 2093 of file AdaptiveKDTree.cpp.
Referenced by moab::AdaptiveKDTree::print().
T moab::SimpleStat< T >::sqr |
Definition at line 2093 of file AdaptiveKDTree.cpp.
Referenced by moab::SimpleStat< T >::dev(), and moab::SimpleStat< T >::rms().
T moab::SimpleStat< T >::sum |
Definition at line 2093 of file AdaptiveKDTree.cpp.
Referenced by moab::SimpleStat< T >::avg(), moab::SimpleStat< T >::dev(), and moab::AdaptiveKDTree::print().