16 namespace alps {
namespace alea {
28 std::ostream &operator<<(std::ostream &, const mean_result<T> &);
33 namespace alps {
namespace alea {
53 size_t size()
const {
return data_.rows(); }
56 size_t count()
const {
return count_; }
59 size_t &
count() {
return count_; }
68 void convert_to_mean();
71 void convert_to_sum();
113 void set_size(
size_t size);
116 bool valid()
const {
return (
bool)store_; }
119 size_t size()
const {
return size_; }
122 mean_acc &operator<<(const computed<T> &src) { add(src, 1);
return *
this; }
128 size_t count()
const {
return store_->count(); }
145 std::unique_ptr< mean_data<T> > store_;
149 template <
typename T>
163 template <
typename T>
178 bool valid()
const {
return (
bool)store_; }
181 size_t size()
const {
return store_->size(); }
184 size_t count()
const {
return store_->count(); }
205 friend std::ostream &operator<< <>(std::ostream &,
const mean_result &);
208 void reduce(
const reducer &,
bool do_pre_commit,
bool do_post_commit);
211 std::unique_ptr< mean_data<T> > store_;
217 template <
typename T>
219 template <
typename T>
228 template <
typename T>
233 const static bool HAVE_MEAN =
true;
234 const static bool HAVE_VAR =
false;
235 const static bool HAVE_COV =
false;
236 const static bool HAVE_TAU =
false;
237 const static bool HAVE_BATCH =
false;
mean_result< T > result_type
mean_result(const mean_data< T > &acc_data)
std::enable_if<!is_sequence< T >::value, std::size_t >::type size(T const &)
const column< T > & mean() const
const mean_data< T > & store() const
void deserialize(deserializer &, const std::string &, autocorr_result< T > &)
const mean_data< T > & store() const
void serialize(serializer &, const std::string &, const autocorr_result< T > &)
void reset(accumulator_wrapper &arg)
bool operator==(const autocorr_result< T > &r1, const autocorr_result< T > &r2)
traits< Acc >::result_type result(const Acc &acc)
const column< T > & data() const
T r(T x, T y=T(), T z=T())
mean_data< T > store_type
traits< Acc >::result_type finalize(Acc &acc)
void reduce(const reducer &r)
bool operator!=(const autocorr_result< T > &r1, const autocorr_result< T > &r2)
count_type< T >::type count(T const &arg)