Tomographer  v5.4
Tomographer C++ Framework Documentation
Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ > Struct Template Reference

Group template parameters for BinningAnalysis. More...

#include <tomographer/mhrw_bin_err.h>

Public Types

typedef ValueType_ ValueType
 Type of the value which we are calculating error bars for. Also the type of the error bars themselves.
 
typedef CountIntType_ CountIntType
 Type used to count the number of samples. Usually int is fine, except if you are really taking a LOT of samples.
 
typedef Eigen::Array< ValueType, NumTrackValuesCTime, SamplesSizeCTimeSamplesArray
 Type of the internal buffer for the raw samples. More...
 
typedef Eigen::Array< ValueType, NumTrackValuesCTime, 1 > BinSumArray
 Type used to store the sum of values. More...
 
typedef Eigen::Array< ValueType, NumTrackValuesCTime, NumLevelsPlusOneCTimeBinSumSqArray
 Type used to store the sum of squares of values at each binning level. More...
 

Static Public Attributes

static constexpr int NumTrackValuesCTime = NumTrackValues_
 Number of values we are tracking/analyzing, if known at compile-time or Eigen::Dynamic.
 
static constexpr int NumLevelsCTime = NumLevels_
 Number of binning levels in our binning analysis, if known at compile-time or Eigen::Dynamic.
 
static constexpr int NumLevelsPlusOneCTime
 Number of binning levels in our binning analysis plus one, if known at compile-time or Eigen::Dynamic. More...
 
static constexpr int SamplesSizeCTime
 Size of the buffer which holds the raw sequence, if of fixed size and known at compile-time. More...
 
static constexpr bool StoreBinSums = StoreBinSums_
 Whether we should store the bin sums, or whether they can be provided independently by the user. More...
 

Detailed Description

template<typename ValueType_, int NumTrackValues_ = Eigen::Dynamic, int NumLevels_ = Eigen::Dynamic, bool StoreBinSums_ = true, typename CountIntType_ = int>
struct Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ >

Group template parameters for BinningAnalysis.

This class serves to group together the template parameters which determine the behavior of BinningAnalysis, as well as provide some common derived types and utility definitions. This more or less acts like a traits class.

See Binning Analysis for how binning analysis works, and BinningAnalysis for the actual implementation.

Template Parameters
NumTrackValues_This class may be used to calculate error bars for different independent values. This is the number of independent values for which we are calculating error bars. May be Eigen::Dynamic if this value is not known at compile-time and will be provided at run-time to the constructor of BinningAnalysis.
NumLevels_The number of binning levels we should perform in our analysis. Use the special value Eigen::Dynamic to specify that this value is not known at compile-time but will be specified at runtime to the constructor of BinningAnalysis.

Note that this is the number of coarse-grainings. If you include the 0-th level which is the raw samples, we obtain (NumLevels+1) data sets. For example, for NumLevels=1, we have the raw samples and the first binned sequence.

Template Parameters
StoreBinSums_In some cases, the sum of the samples for each value, needed to determine the mean values, is already calculated independently (e.g. using a ValueHistogramMHRWStatsCollector). In this case, we don't need to compute it separately. Set this template parameter to false if you can provide the bin means directly to BinningAnalysis::calcErrorLevels(), in which case BinningAnalysis won't itself keep track of the means of the samples.
CountIntType_The integer type used to count the number of samples. Usually you won't have any problems with int, except if you are really collecting a LOT of samples.

Definition at line 212 of file mhrw_bin_err.h.

Member Typedef Documentation

§ BinSumArray

template<typename ValueType_ , int NumTrackValues_ = Eigen::Dynamic, int NumLevels_ = Eigen::Dynamic, bool StoreBinSums_ = true, typename CountIntType_ = int>
typedef Eigen::Array<ValueType, NumTrackValuesCTime, 1> Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ >::BinSumArray

Type used to store the sum of values.

This is a linear array of fixed size NumTrackValuesCTime (or Eigen::Dynamic). This is used to store one value for each tracked value, e.g. the sum of all the samples.

Definition at line 282 of file mhrw_bin_err.h.

§ BinSumSqArray

template<typename ValueType_ , int NumTrackValues_ = Eigen::Dynamic, int NumLevels_ = Eigen::Dynamic, bool StoreBinSums_ = true, typename CountIntType_ = int>
typedef Eigen::Array<ValueType, NumTrackValuesCTime, NumLevelsPlusOneCTime> Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ >::BinSumSqArray

Type used to store the sum of squares of values at each binning level.

This is a matrix of fixed size NumTrackValuesCTime x NumLevelsPlusOneCTime (or Eigen::Dynamic). This is used to store a list of values (one for each binning level, including the 0-th) for each tracked value, e.g. the sum of all the samples.

Definition at line 290 of file mhrw_bin_err.h.

§ SamplesArray

template<typename ValueType_ , int NumTrackValues_ = Eigen::Dynamic, int NumLevels_ = Eigen::Dynamic, bool StoreBinSums_ = true, typename CountIntType_ = int>
typedef Eigen::Array<ValueType, NumTrackValuesCTime, SamplesSizeCTime> Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ >::SamplesArray

Type of the internal buffer for the raw samples.

See SamplesSizeCTime. This is a matrix of sample buffers for each integration value we're tracking.

Note
This might change in the future, don't rely on this.

Definition at line 274 of file mhrw_bin_err.h.

Member Data Documentation

§ NumLevelsPlusOneCTime

template<typename ValueType_ , int NumTrackValues_ = Eigen::Dynamic, int NumLevels_ = Eigen::Dynamic, bool StoreBinSums_ = true, typename CountIntType_ = int>
constexpr int Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ >::NumLevelsPlusOneCTime
static
Initial value:
= (NumLevelsCTime == Eigen::Dynamic
? Eigen::Dynamic
: (NumLevelsCTime + 1))

Number of binning levels in our binning analysis plus one, if known at compile-time or Eigen::Dynamic.

Definition at line 232 of file mhrw_bin_err.h.

§ SamplesSizeCTime

template<typename ValueType_ , int NumTrackValues_ = Eigen::Dynamic, int NumLevels_ = Eigen::Dynamic, bool StoreBinSums_ = true, typename CountIntType_ = int>
constexpr int Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ >::SamplesSizeCTime
static
Initial value:
=
tomo_internal::helper_samples_size<NumLevelsCTime, (NumLevelsCTime > 0 && NumLevelsCTime < 7)>::value

Size of the buffer which holds the raw sequence, if of fixed size and known at compile-time.

The internal buffer which holds the raw samples has (in this implementation) to hold all the samples until they can be "flushed" up to one sample at the last level. This is exactly \( 2^{\mathrm{number\ of\ levels}} \). (In fact, we have one such buffer per integration/value we're tracking.)

If this number is small enough (~7 binning levels (?)), and is known at compile-time, then the buffer is internally declared as a fixed-size Eigen type; otherwise it is dynamically allocated on the heap.

Todo:
This might change in the future. It would be better to have an "auto-flushing" mechanism as in ALPS: https://alps.comp-phys.org/svn/alps1/trunk/alps/src/alps/alea/simplebinning.h which uses a shorter buffer. This would avoid limiting the number of binning levels because of memory size.

This property contains the size of the buffer if it is of fixed size, i.e. if the binning level is known at compile-time and is not too large. Otherwise, it is set to Eigen::Dynamic.

Definition at line 257 of file mhrw_bin_err.h.

§ StoreBinSums

template<typename ValueType_ , int NumTrackValues_ = Eigen::Dynamic, int NumLevels_ = Eigen::Dynamic, bool StoreBinSums_ = true, typename CountIntType_ = int>
constexpr bool Tomographer::BinningAnalysisParams< ValueType_, NumTrackValues_, NumLevels_, StoreBinSums_, CountIntType_ >::StoreBinSums = StoreBinSums_
static

Whether we should store the bin sums, or whether they can be provided independently by the user.

See class documentation for BinningAnalysis and BinningAnalysisParams.

Definition at line 265 of file mhrw_bin_err.h.


The documentation for this struct was generated from the following file: