TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
Loading...
Searching...
No Matches

Detailed Description

Histograms and small helpers shared by the rest of the Statistical analysis tools module.

Classes

class  triqs::stat::histogram
 Class representing a histogram on a given interval. More...

Typedefs

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.

Functions

auto triqs::stat::abs_square (auto const &x)
 Calculate the (elementwise) absolute square of an array/view/scalar.
template<typename T>
auto triqs::stat::make_real (T &&t)
 Make a given object real and regular.
template<StatCompatible T>
auto triqs::stat::nan_sample (T const &sample)
 Get a sample with all elements set to NaN.
template<StatCompatible T>
auto triqs::stat::zeroed_sample (T const &sample)
 Get a sample with all elements set to zero.

Function Documentation

◆ 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
xInput 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
TInput type.
Parameters
tInput 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
Ttriqs::stat::StatCompatible type.
Parameters
sampleDummy 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
Ttriqs::stat::StatCompatible type.
Parameters
sampleDummy 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.