6#include "./average_k.hpp"
8namespace triqs_ctint::measures {
10 average_k::average_k(params_t
const &, qmc_config_t
const &qmc_config_, container_set *results)
11 : qmc_config(qmc_config_), average_k_(results->
average_k), average_k_error_(results->average_k_error), k_bins_(dcomplex{0.0}, 128, 1) {
16 auto k = qmc_config.perturbation_order();
18 k_bins_ << dcomplex(
double(k));
23 average_k_ = mpi::all_reduce(average_k_, comm);
24 N = mpi::all_reduce(N, comm);
25 average_k_ = average_k_ / N;
27 auto [m, err, tau] = k_bins_.mean_error_and_tau(comm);
28 average_k_error_ = std::abs(err);
32 std::ostringstream os;
33 os <<
"Average perturbation order: " << average_k_ / N;
Measure of the average perturbation order.
std::string report() const
Report current value representation.
void accumulate(mc_weight_t)
Accumulate average perturbation order.
void collect_results(mpi::communicator const &comm)
Reduce and normalize.