TRIQS/triqs_ctint 4.0.0
A TRIQS application
Loading...
Searching...
No Matches
remove.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 "./../lazy_det_operation.hpp"
9#include "./../vertex_factories.hpp"
10#include <triqs/mc_tools/random_generator.hpp>
11
12namespace triqs_ctint::moves {
13
15 struct remove {
16
19
21 std::vector<vertex_factory_t> const &vertex_factories;
22
24 triqs::mc_tools::random_generator &rng;
25
27 int n_removals = 1;
28
30 int max_order = -1;
31
33 std::vector<int> vpos = {};
34
37
39 mc_weight_t attempt();
40
42 mc_weight_t accept();
43
45 void reject();
46 };
47
48} // namespace triqs_ctint::moves
Type of the Monte-Carlo configuration.
The move that removes one or multiple vertices from the configuration.
Definition remove.hpp:15
qmc_config_t * qmc_config
The Monte-Carlo configuration.
Definition remove.hpp:18
int max_order
Maximum perturbation order (<0 : unlimited).
Definition remove.hpp:30
triqs::mc_tools::random_generator & rng
The random number generator.
Definition remove.hpp:24
lazy_det_operation_t lazy_op
Object that allows to delay determinant operations, necessary for multi-inserts/removes.
Definition remove.hpp:36
int n_removals
Switch for double vertex removals.
Definition remove.hpp:27
mc_weight_t attempt()
Attempt vertex removal.
Definition remove.cpp:10
std::vector< vertex_factory_t > const & vertex_factories
Factory that randomly generates vertices.
Definition remove.hpp:21
mc_weight_t accept()
Accept vertex removal.
Definition remove.cpp:58
std::vector< int > vpos
Positions at which to remove vertices.
Definition remove.hpp:33
void reject()
Reject vertex removal.
Definition remove.cpp:72