Histograms and small helpers shared by the rest of the Statistical analysis tools module.
|
|
template<typename T> |
| using | triqs::stat::get_real_t = std::remove_cvref_t<decltype(make_real(std::declval<T>()))> |
| | Type trait to get the type that would be returned by triqs::stat::make_real.
|
|
template<typename T> |
| using | triqs::stat::get_regular_t = std::remove_cvref_t<decltype(nda::make_regular(std::declval<T>()))> |
| | Type trait to get the type that would be returned by nda::make_regular.
|
◆ abs_square()
| auto triqs::stat::abs_square |
( |
auto const & | x | ) |
|
|
nodiscard |
#include <triqs/stat/utils.hpp>
Calculate the (elementwise) absolute square of an array/view/scalar.
The return type depends on the input type.
- Parameters
-
| x | Input array/view/scalar. |
- Returns
- (Elementwise) Absolute square of the input.
Definition at line 107 of file utils.hpp.
◆ make_real()
template<typename T>
| auto triqs::stat::make_real |
( |
T && | t | ) |
|
|
nodiscard |
#include <triqs/stat/utils.hpp>
Make a given object real and regular.
It simply calls nda::make_regular and nda::real on the input object.
The return type of this function depends on the input type T.
- Template Parameters
-
- Parameters
-
| t | Input object to make real and regular. |
- Returns
- Real, regular copy of the input object.
Definition at line 51 of file utils.hpp.
◆ nan_sample()
template<StatCompatible T>
| auto triqs::stat::nan_sample |
( |
T const & | sample | ) |
|
|
nodiscard |
#include <triqs/stat/utils.hpp>
Get a sample with all elements set to NaN.
Used to flag undefined / insufficient-data results in places where a numeric value is expected (e.g. estimates of the standard error or autocorrelation time when there are too few samples). NaN is preferred over zero because it propagates through arithmetic and is distinguishable from a legitimate zero measurement.
- Template Parameters
-
- Parameters
-
| sample | Dummy sample to determine its type and shape in case of an nda::Array type. |
- Returns
- NaN-filled sample.
Definition at line 86 of file utils.hpp.
◆ zeroed_sample()
template<StatCompatible T>
| auto triqs::stat::zeroed_sample |
( |
T const & | sample | ) |
|
|
nodiscard |
#include <triqs/stat/utils.hpp>
Get a sample with all elements set to zero.
- Template Parameters
-
- Parameters
-
| sample | Dummy sample to determine its type and shape in case of an nda::Array type. |
- Returns
- Zeroed sample.
Definition at line 66 of file utils.hpp.