28#include <fmt/format.h>
35namespace triqs::mc_tools {
38 std::uint64_t nacc_tot = mpi::all_reduce(nacc_, c);
39 std::uint64_t nprop_tot = mpi::all_reduce(nprop_, c);
40 acc_rate_ = (nprop_tot > 0 ?
static_cast<double>(nacc_tot) /
static_cast<double>(nprop_tot) : 0.0);
41 ptr_->collect_statistics(c);
49 ptr_->ms_clear_statistics();
54 auto str = fmt::format(
"{}Move set {}: Proposed = {}, Accepted = {}, Rate = {:.4f}\n", prefix, name, nprop_, nacc_, acc_rate_);
55 return str + ptr_->ms_get_statistics(prefix +
" ");
57 return fmt::format(
"{}Move {}: Proposed = {}, Accepted = {}, Rate = {:.4f}\n", prefix, name, nprop_, nacc_, acc_rate_);
63 auto str = fmt::format(
"{}Move set {}: Duration = {:.4f}\n", prefix, name,
duration());
64 return str + ptr_->ms_get_timings(prefix +
" ");
66 return fmt::format(
"{}Move {}: Duration = {:.4f}\n", prefix, name,
duration());
Provides type erasure for MC moves.