TRIQS/triqs_ctint 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
histogram.hpp
1// Copyright (c) 2018--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
10namespace triqs_ctint::measures {
11
12 // Measure the histogram of perturbation order
13 struct histogram {
14
15 histogram(params_t const &, qmc_config_t const &qmc_config_, container_set *results);
16
18 void accumulate(mc_weight_t);
19
21 void collect_results(mpi::communicator const &comm);
22
23 private:
24 // The Monte-Carlo configuration
25 qmc_config_t const &qmc_config;
26
27 // Reference to accumulation vector
28 std::optional<std::vector<double>> &histogram_;
29
30 // Accumulation counter
31 long N = 0;
32 };
33
34} // namespace triqs_ctint::measures