TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches
concepts.hpp
Go to the documentation of this file.
1// Copyright (c) 2021 Simons Foundation
2//
3// This program is free software: you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation, either version 3 of the License, or
6// (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12//
13// You may obtain a copy of the License at
14// https://www.gnu.org/licenses/gpl-3.0.txt
15//
16// Authors: Philipp Dumitrescu, Nils Wentzell
17
22
23#pragma once
24
25#include <nda/nda.hpp>
26
27#include <complex>
28#include <ranges>
29
30namespace triqs::stat {
31
36
46 template <typename T>
48 (nda::Scalar<T> || (nda::Array<T> && nda::get_algebra<T> == 'A')) && nda::is_any_of<nda::get_value_t<T>, double, std::complex<double>>;
49
57 template <typename T>
58 concept AccCompatible = StatCompatible<T> && (nda::Scalar<T> || nda::is_regular_v<T>);
59
70 template <typename R>
71 concept StatCompatibleRange = std::ranges::sized_range<R> && std::ranges::forward_range<R> && StatCompatible<std::ranges::range_value_t<R>>;
72
74
75} // namespace triqs::stat
Concept to check if a type can be used with triqs::stat::lin_binning or triqs::stat::log_binning.
Definition concepts.hpp:58
Concept to check if a range can be used with various Statistical analysis tools.
Definition concepts.hpp:71
Concept to check if a type can be used with various Statistical analysis tools.
Definition concepts.hpp:47