Tomographer  v5.2
Tomographer C++ Framework Documentation
Tomographer::ValueHistogramWithBinningMHRWStatsCollector< Params, LoggerType_ > Class Template Reference

Collect a histogram of values from a MH random walk, with binning analysis. More...

#include <tomographer/mhrwstatscollectors.h>

+ Inheritance diagram for Tomographer::ValueHistogramWithBinningMHRWStatsCollector< Params, LoggerType_ >:
+ Collaboration diagram for Tomographer::ValueHistogramWithBinningMHRWStatsCollector< Params, LoggerType_ >:

Public Types

typedef Params::ValueCalculator ValueCalculator
 See ValueHistogramWithBinningMHRWStatsCollectorParams::ValueCalculator .
 
typedef Params::CountIntType CountIntType
 See ValueHistogramWithBinningMHRWStatsCollectorParams::CountIntType .
 
typedef Params::CountRealAvgType CountRealAvgType
 See ValueHistogramWithBinningMHRWStatsCollectorParams::CountRealAvgType .
 
typedef LoggerType_ LoggerType
 Somewhere where this object may log what it's doing.
 
typedef Params::BaseHistogramType BaseHistogramType
 See ValueHistogramWithBinningMHRWStatsCollectorParams::BaseHistogramType .
 
typedef Params::HistogramParams HistogramParams
 See ValueHistogramWithBinningMHRWStatsCollectorParams::HistogramParams .
 
typedef Params::ValueType ValueType
 See ValueHistogramWithBinningMHRWStatsCollectorParams::ValueType .
 
typedef Params::BinningAnalysisParamsType BinningAnalysisParamsType
 See ValueHistogramWithBinningMHRWStatsCollectorParams::BinningAnalysisParamsType .
 
typedef BinningAnalysis< BinningAnalysisParamsType, LoggerTypeBinningAnalysisType
 The corresponding BinningAnalysis type for this value histogram stats collector.
 
typedef Params::Result ResultType
 See ValueHistogramWithBinningMHRWStatsCollectorParams::Result .
 
typedef ValueHistogramMHRWStatsCollector< ValueCalculator, LoggerType, BaseHistogramTypeValueHistogramMHRWStatsCollectorType
 This is the natural ValueHistogramMHRWStatsCollector type on which we're adding error bars.
 

Public Member Functions

 ValueHistogramWithBinningMHRWStatsCollector (HistogramParams histogram_params, const ValueCalculator &vcalc, int num_levels, LoggerType &logger_)
 
const BaseHistogramTypehistogram () const
 Get the histogram data collected so far. See BaseHistogramType .
 
const BinningAnalysisTypegetBinningAnalysis () const
 
const ResultTypegetResult () const
 Get the final histogram data. This method is needed for Resultable Interface compliance. More...
 
Eigen::Array< CountRealAvgType, Eigen::Dynamic, 1 > binMeans () const
 Get the current bin means collected so far. More...
 
ResultType stealResult ()
 Retrieve the final histogram data, in compliance with Resultable Interface compliance. More...
 
void init ()
 Part of the MHRWStatsCollector Interface. Initializes the histogram to zeros.
 
void thermalizingDone ()
 Part of the MHRWStatsCollector Interface. No-op.
 
void done ()
 Finalize the data collection. Part of the MHRWStatsCollector Interface.
 
template<typename CountIntType2 , typename PointType , typename LLHValueType , typename MHRandomWalk >
void rawMove (CountIntType2 k, bool is_thermalizing, bool is_live_iter, bool accepted, double a, const PointType &newpt, LLHValueType newptval, const PointType &curpt, LLHValueType curptval, MHRandomWalk &mh)
 Part of the MHRWStatsCollector Interface. No-op.
 
template<typename CountIntType2 , typename PointType , typename LLHValueType , typename MHRandomWalk >
void processSample (CountIntType2 k, CountIntType2 n, const PointType &curpt, LLHValueType curptval, MHRandomWalk &mh)
 Part of the MHRWStatsCollector Interface. Records the sample in the histogram.
 

Static Public Attributes

static constexpr int NumTrackValuesCTime = Params::NumTrackValues
 See ValueHistogramWithBinningMHRWStatsCollectorParams::NumTrackValues .
 
static constexpr int NumLevelsCTime = Params::NumLevels
 See ValueHistogramWithBinningMHRWStatsCollectorParams::NumLevels .
 

Detailed Description

template<typename Params, typename LoggerType_ = Logger::VacuumLogger>
class Tomographer::ValueHistogramWithBinningMHRWStatsCollector< Params, LoggerType_ >

Collect a histogram of values from a MH random walk, with binning analysis.

The Params template parameter must be a ValueHistogramWithBinningMHRWStatsCollectorParams with the relevant template parameters.

Definition at line 755 of file mhrwstatscollectors.h.

Member Function Documentation

§ binMeans()

template<typename Params, typename LoggerType_ = Logger::VacuumLogger>
Eigen::Array<CountRealAvgType,Eigen::Dynamic,1> Tomographer::ValueHistogramWithBinningMHRWStatsCollector< Params, LoggerType_ >::binMeans ( ) const
inline

Get the current bin means collected so far.

Definition at line 856 of file mhrwstatscollectors.h.

§ getResult()

template<typename Params, typename LoggerType_ = Logger::VacuumLogger>
const ResultType& Tomographer::ValueHistogramWithBinningMHRWStatsCollector< Params, LoggerType_ >::getResult ( ) const
inline

Get the final histogram data. This method is needed for Resultable Interface compliance.

This will only yield a valid value AFTER the all the data has been collected and done() was called.

Definition at line 848 of file mhrwstatscollectors.h.

§ stealResult()

template<typename Params, typename LoggerType_ = Logger::VacuumLogger>
ResultType Tomographer::ValueHistogramWithBinningMHRWStatsCollector< Params, LoggerType_ >::stealResult ( )
inline

Retrieve the final histogram data, in compliance with Resultable Interface compliance.

This will only yield a valid value AFTER the all the data has been collected and done() was called.

Warning
Calling this function moves the result type to the returned type, and resets the histogram in this instance. Further calls to getResult() and/or stealResult() have undefined behavior.

Definition at line 873 of file mhrwstatscollectors.h.


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