1 #include "hmbdc/Copyright.hpp" 9 namespace hmbdc {
namespace numeric {
13 : min_(std::numeric_limits<T>::max())
14 , max_(std::numeric_limits<T>::min())
23 sumSq_ += double(sample) * double(sample);
24 min_ = std::min(min_, sample);
25 max_ = std::max(max_, sample);
28 size_t sampleSize()
const {
33 std::ostream& operator << (std::ostream& os,
Stat const& st) {
36 os <<
"mean=" << st.sum_ / st.sampleSize_
37 <<
" std_dev=" << sqrt((st.sumSq_ -
double(st.sum_) *
double(st.sum_) / st.sampleSize_) / st.sampleSize_)
38 <<
" min=" << st.min_ <<
" max=" << st.max_
39 <<
" sampleSize=" << st.sampleSize_ << endl;
41 os <<
"NA sampleSize=" << st.sampleSize_ << endl;
Definition: TypedString.hpp:74