Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
A StatsCollector which builds a histogram of values calculated with a ValueCalculator for each data sample point. More...
#include <tomographer/mhrw.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_ | Result |
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 Result & | getResult () const |
Get the histogram data collected so far. This method is needed for Resultable Interface compliance. | |
void | init () |
Part of the MHRWStatsCollector Interface. Initializes the histogram to zeros. | |
void | thermalizing_done () |
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 | raw_move (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 | process_sample (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.
|
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.