TRIQS/triqs_ctint 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
average_sign.hpp
1// Copyright (c) 2017--present, The Simons Foundation
2// This file is part of TRIQS/ctint and is licensed under the terms of GPLv3 or later.
3// SPDX-License-Identifier: GPL-3.0-or-later
4// See LICENSE in the root of this distribution for details.
5
6#pragma once
7#include "../qmc_config.hpp"
8#include "../container_set.hpp"
9#include <triqs/stat/lin_binning.hpp>
10
11namespace triqs_ctint::measures {
12
14 struct average_sign {
15
16 average_sign(params_t const &, qmc_config_t const &, container_set *results);
17
19 void accumulate(mc_weight_t sign);
20
22 void collect_results(mpi::communicator const &comm);
23
25 std::string report() const;
26
27 private:
28 // Reference to double for accumulation
29 mc_weight_t &average_sign_;
30 std::optional<double> &average_sign_error_;
31 uint64_t &nmeasures;
32
33 // The Monte-Carlo configuration
34 qmc_config_t const &qmc_config;
35
36 // Linear binning for error estimation
37 triqs::stat::lin_binning<dcomplex> sign_bins_;
38
39 // Accumulation counter
40 long count = 0;
41 };
42
43} // namespace triqs_ctint::measures
Type of the Monte-Carlo configuration.
Container for all (optional) quantities measured and post-processed by the solver.
std::string report() const
Report the current value representation.
void collect_results(mpi::communicator const &comm)
Reduce and normalize.
void accumulate(mc_weight_t sign)
Accumulate average sign.
A struct combining both constr_params_t and solve_params_t.
Definition params.hpp:210