21 #ifndef QMCPLUSPLUS_ACCUMULATORS_H 22 #define QMCPLUSPLUS_ACCUMULATORS_H 31 template<typename T, typename = typename std::enable_if<std::is_floating_point<T>::value>::type>
134 return std::numeric_limits<T>::max();
146 template<
typename ACC>
153 std::ostream& operator<<(std::ostream& os, accumulator_set<T>& rhs)
155 os <<
"accumulator_set: " 156 <<
" value = " << rhs.properties[0] <<
" value_sq = " << rhs.properties[1] <<
" weight = " << rhs.properties[2];
std::pair< return_type, return_type > mean_and_variance() const
return_type mean2() const
return the mean of squared values
void reset(value_type v, value_type w)
reset properties
void reset(value_type v, value_type vv, value_type w)
reset properties
bool good() const
return true if Weight!= 0
void operator()(value_type x, value_type w)
add a sample and
void add(value_type x)
add a value but set the weight 1
bool bad() const
return true if Weight== 0
generic accumulator of a scalar type
double norm(const zVec &c)
void operator()(value_type x)
add a sample
return_type mean() const
return the mean
return_type result() const
return the sum
return_type result2() const
return the sum of value squared
return_type count() const
return the count
return_type variance() const
ACC::value_type mean(const ACC &ac)
QMCTraits::FullPrecRealType value_type