Tomographer
v4.1
Tomographer C++ Framework Documentation
|
A StatsCollector which builds a histogram of values calculated with a ValueCalculator for each data sample point. More...
#include <tomographer/mhrwstatscollectors.h>
Public Types | |
typedef ValueCalculator_ | ValueCalculator |
The type which calculates the interesting value. Should be of type interface ValueCalculator Interface. | |
typedef ValueCalculator::ValueType | ValueType |
The type to use to represent a calculated distance. | |
typedef HistogramType_ | HistogramType |
The type of the histogram. Usually a UniformBinsHistogram with ValueType range type. | |
typedef HistogramType_ | ResultType |
Required for compliance with Resultable Interface type. | |
typedef HistogramType::Params | HistogramParams |
Structure which holds the parameters of the histogram we're recording. | |
Public Member Functions | |
ValueHistogramMHRWStatsCollector (HistogramParams histogram_params, const ValueCalculator &vcalc, LoggerType &logger) | |
Simple constructor, initializes with the given values. | |
const HistogramType & | histogram () const |
Get the histogram data collected so far. See HistogramType. | |
const ResultType & | getResult () const |
Get the histogram data collected. This method is needed for 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. | |
template<bool PrintHistogram = true> | |
void | done () |
Part of the MHRWStatsCollector Interface. More... | |
template<typename CountIntType , typename PointType , typename LLHValueType , typename MHRandomWalk > | |
void | rawMove (CountIntType k, bool, bool, bool, double, const PointType &, LLHValueType, const PointType &, LLHValueType, MHRandomWalk &) |
Part of the MHRWStatsCollector Interface. No-op. | |
template<typename CountIntType , typename PointType , typename LLHValueType , typename MHRandomWalk > | |
std::size_t | processSample (CountIntType k, CountIntType n, const PointType &curpt, LLHValueType, MHRandomWalk &) |
Part of the MHRWStatsCollector Interface. Records the sample in the histogram. | |
A StatsCollector which builds a histogram of values calculated with a ValueCalculator for each data sample point.
ValueHistogramMHRWStatsCollector complies both with the MHRWStatsCollector Interface and the Resultable Interface.
This stats collector is suitable for tracking statistics during a MHRandomWalk.
The ValueCalculator is a type expected to implement the ValueCalculator Interface. The argument of the getValue() method should be the same type as the point type of the random walk; the current point of the random walk is passed on as is.
Definition at line 239 of file mhrwstatscollectors.h.
|
inline |
Part of the MHRWStatsCollector Interface.
If you call this function with PrintHistogram=true (the default), then this will display the final histogram in the logger at logging level Logger::LONGDEBUG.
If this function is called with PrintHistogram=false, then this is a no-op.
Definition at line 324 of file mhrwstatscollectors.h.
|
inline |
Get the histogram data collected. This method is needed for Resultable Interface compliance.
Definition at line 299 of file mhrwstatscollectors.h.