|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include "../../arrays.hpp"#include "../../mesh/concepts.hpp"#include "../../mesh/matsubara_freq.hpp"#include "../../mesh/prod.hpp"#include "../../mesh/utils.hpp"#include "../../utility/factory.hpp"#include <array>#include <complex>#include <cstddef>#include <utility>Provides common type aliases, forward declarations and internal helpers for the Green's function containers.
Definition in file defs.hpp.
Go to the source code of this file.
Classes | |
| struct | triqs::gfs::default_evaluator |
| Default evaluator policy. More... | |
| struct | triqs::gfs::matsubara_freq |
| Represents a Matsubara frequency \( i\omega_n \). More... | |
Enumerations | |
| enum | triqs::gfs::statistic_enum |
| Enum to specify particle statistics. More... | |
Functions | |
| template<typename... Ts> | |
| auto | triqs::gfs::closest_mesh_pt (Ts &&...ts) |
| Construct a triqs::mesh::closest_mesh_point_t object for a single value or a std::tuple of triqs::mesh::closest_mesh_point_t objects for multiple values. | |
| template<typename T, typename... U> | |
| T | triqs::gfs::factory (U &&...x) |
| Generic factory to construct an object of a given type from an arbitrary parameter pack of arguments. | |
Variables | |
| template<Mesh M> | |
| static constexpr int | triqs::gfs::n_variables |
| Constexpr variable that holds the number of meshes in a triqs::mesh::Mesh type ( \( 1 \) for non-product meshes). | |
|
nodiscard |
Construct a triqs::mesh::closest_mesh_point_t object for a single value or a std::tuple of triqs::mesh::closest_mesh_point_t objects for multiple values.
| Ts | Value types. |
| ts | Values to be wrapped in triqs::mesh::closest_mesh_point_t objects. |
| T triqs::utility::factory | ( | U &&... | x | ) |
Generic factory to construct an object of a given type from an arbitrary parameter pack of arguments.
The actual construction is delegated to the helper class detail::factories<T>, whose static invoke member is called with the forwarded arguments. By default detail::factories<T> simply forwards its single argument to a constructor of T, so any type that is directly constructible from the given argumnets works out of the box.
To support custom construction logic for a type T (e.g. element-wise conversion, allocation, or building from a different representation), provide a partial or full specialization of detail::factories<T> exposing one or more static invoke overloads that return a T. The library already specializes it for std::vector<T> to allow constructing a vector from another vector with element-wise conversion.
| T | Target type. |
| U | Argument types. |
| x | Constructor arguments. |
Definition at line 95 of file factory.hpp.