|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
Streaming binning accumulators that estimate mean, error and autocorrelation time on the fly.
An accumulator receives samples one at a time via operator<< and maintains running estimators without storing the full sample stream. Two flavours are provided:
Both accumulators provide MPI-aware variants of their estimator methods and HDF5 serialisation for checkpointing long runs. The free function triqs::stat::compress_bins merges adjacent bins of a std::vector<T> by a given compression factor and is used by triqs::stat::lin_binning when aligning bin capacities across MPI ranks.
Classes | |
| class | triqs::stat::lin_binning< T > |
| Linear binning accumulator. More... | |
| class | triqs::stat::log_binning< T > |
| Logarithmic binning accumulator. More... | |
Functions | |
| template<AccCompatible T> | |
| auto | triqs::stat::compress_bins (std::vector< T > const &bins, int fac) |
| Compress a given number of adjacent bins. | |
| auto triqs::stat::compress_bins | ( | std::vector< T > const & | bins, |
| int | fac ) |
#include <triqs/stat/lin_binning.hpp>
Compress a given number of adjacent bins.
It simply averages the data of adjacent bins and returns a vector containing those averages. The compression factor determines the number of adjacent bins that are merged together. Left over bins are discarded.
It returns a copy of the given bins if the compression factor is less than 2 and it returns an empty vector if the number of bins is smaller than the compression factor.
| T | triqs::stat::AccCompatible type. |
| bins | std::vector containing the bins to be compressed. |
| fac | Compression factor. |
Definition at line 60 of file lin_binning.hpp.