16 namespace alps {
namespace alea {
29 std::ostream &operator<<(std::ostream &, const autocorr_result<T> &);
34 namespace alps {
namespace alea {
80 void set_size(
size_t size);
83 void set_batch_size(
size_t batch_size);
86 void set_granularity(
size_t granularity);
89 bool valid()
const {
return !level_.empty(); }
92 size_t size()
const {
return size_; }
95 autocorr_acc& operator<<(const computed<T>& src){ add(src, 1);
return *
this; }
101 size_t count()
const {
return count_; }
109 size_t nlevel()
const {
return level_.size(); }
121 size_t size_, batch_size_, count_, nextlevel_, granularity_;
122 std::vector<level_acc_type> level_;
127 template <
typename T>
146 template <
typename T>
158 bool valid()
const {
return !level_.empty(); }
161 size_t size()
const {
return level_[0].size(); }
164 size_t count()
const {
return level_[0].count(); }
167 double count2()
const;
194 friend std::ostream &operator<< <>(std::ostream &,
const autocorr_result &);
196 size_t find_level(
size_t min_samples)
const;
198 size_t batch_size(
size_t level)
const;
200 size_t nlevel()
const {
return level_.size(); }
202 const level_result_type &
level(
size_t i)
const {
return level_[i]; }
204 level_result_type &
level(
size_t i) {
return level_[i]; }
207 void reduce(
const reducer &
r,
bool do_pre_commit,
bool do_post_commit);
210 const static size_t DEFAULT_MIN_SAMPLES = 1024;
211 std::vector<level_result_type> level_;
217 template <
typename T>
219 template <
typename T>
228 template <
typename T>
236 const static bool HAVE_MEAN =
true;
237 const static bool HAVE_VAR =
true;
238 const static bool HAVE_COV =
false;
239 const static bool HAVE_TAU =
true;
240 const static bool HAVE_BATCH =
false;
const level_acc_type & level(size_t i) const
typename bind< circular_var, T >::var_type var_type
const level_result_type & level(size_t i) const
circular_var strategy_type
std::enable_if<!is_sequence< T >::value, std::size_t >::type size(T const &)
bind< circular_var, T >::var_type var_type
void reduce(const reducer &r)
level_result_type & level(size_t i)
void deserialize(deserializer &, const std::string &, autocorr_result< T > &)
var_result< T, circular_var > level_result_type
circular_var strategy_type
bind< circular_var, T >::cov_type cov_type
void serialize(serializer &, const std::string &, const autocorr_result< T > &)
bind< circular_var, T >::cov_type cov_type
void reset(accumulator_wrapper &arg)
bind< circular_var, T >::var_type var_type
bool operator==(const autocorr_result< T > &r1, const autocorr_result< T > &r2)
bool tau_available() const
traits< Acc >::result_type result(const Acc &acc)
const column< T > & mean() const
T r(T x, T y=T(), T z=T())
autocorr_result< T > result_type
traits< Acc >::result_type finalize(Acc &acc)
bind< circular_var, T >::var_type var_type
autocorr_result(size_t nlevel=0)
bool operator!=(const autocorr_result< T > &r1, const autocorr_result< T > &r2)
count_type< T >::type count(T const &arg)