Tomographer  v1.0a
Tomographer C++ Framework Documentation
Tomographer::ValueHistogramMHRWStatsCollector< ValueCalculator_, LoggerType, HistogramType_ > Class Template Reference

A StatsCollector which builds a histogram of values calculated with a ValueCalculator for each data sample point. More...

#include <tomographer/mhrw.h>

+ Inheritance diagram for Tomographer::ValueHistogramMHRWStatsCollector< ValueCalculator_, LoggerType, HistogramType_ >:

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 HistogramTypehistogram () const
 Get the histogram data collected so far. See HistogramType.
 
const ResultgetResult () 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.
 

Detailed Description

template<typename ValueCalculator_, typename LoggerType = Logger::VacuumLogger, typename HistogramType_ = UniformBinsHistogram<typename ValueCalculator_::ValueType>>
class Tomographer::ValueHistogramMHRWStatsCollector< ValueCalculator_, LoggerType, HistogramType_ >

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.

Definition at line 720 of file mhrw.h.

Member Function Documentation

template<typename ValueCalculator_, typename LoggerType = Logger::VacuumLogger, typename HistogramType_ = UniformBinsHistogram<typename ValueCalculator_::ValueType>>
template<bool PrintHistogram = true>
void Tomographer::ValueHistogramMHRWStatsCollector< ValueCalculator_, LoggerType, HistogramType_ >::done ( )
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 798 of file mhrw.h.


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