Tomographer  v4.0
Tomographer C++ Framework Documentation
Tomographer Namespace Reference

Base namespace for the Tomographer project. More...

Namespaces

 DenseDM
 Main implementation for densely represented density matrices.
 
 Logger
 Tomographer's Logging Framework
 
 MAT
 Utilities and helpers for reading MATLAB .mat files.
 
 MathTools
 General math routines.
 
 MHRWTasks
 Definitions for running multiple Metropolis-Hastings random walks, and collecting statistics over the visited samples.
 
 MultiProc
 Definitions for multi-processing classes and helpers.
 
 Tools
 Various useful tools.
 

Classes

class  AveragedHistogram
 Combines several histograms (with same parameters) into an averaged histogram. More...
 
class  BinningAnalysis
 Simple binning analysis for determining error bars. More...
 
struct  BinningAnalysisParams
 Group template parameters for BinningAnalysis. More...
 
class  MHRandomWalk
 A Metropolis-Hastings Random Walk. More...
 
struct  MHRWParams
 Specify the parameters of a Metropolis-Hastings random walk. More...
 
struct  MHRWStatsCollectorStatus
 Template, specializable class to get status reports from stats collectors. More...
 
struct  MHRWStatsCollectorStatus< MultipleMHRWStatsCollectors< Args... > >
 Provide status reporting for a MultipleMHRWStatsCollectors. More...
 
struct  MHRWStatsCollectorStatus< ValueHistogramMHRWStatsCollector< ValueCalculator_, LoggerType_, HistogramType_ > >
 Provide status reporting for a ValueHistogramMHRWStatsCollector. More...
 
struct  MHRWStatsCollectorStatus< ValueHistogramWithBinningMHRWStatsCollector< Params_, LoggerType_ > >
 Provide status reporting for a ValueHistogramWithBinningMHRWStatsCollector. More...
 
class  MultipleMHRWStatsCollectors
 A simple MHRWStatsCollector interface which combines several stats collectors. More...
 
class  MultiplexorValueCalculator
 A ValueCalculator-instance which the choice of which ValueCalculator to use at run-time. More...
 
class  UniformBinsHistogram
 Stores a histogram. More...
 
struct  UniformBinsHistogramParams
 The parameters of a UniformBinsHistogram. More...
 
class  UniformBinsHistogramWithErrorBars
 Stores a histogram along with error bars. More...
 
class  ValueHistogramMHRWStatsCollector
 A StatsCollector which builds a histogram of values calculated with a ValueCalculator for each data sample point. More...
 
class  ValueHistogramWithBinningMHRWStatsCollector
 Collect a histogram of values from a MH random walk, with binning analysis. More...
 
struct  ValueHistogramWithBinningMHRWStatsCollectorParams
 Traits-like class for ValueHistogramWithBinningMHRWStatsCollector. More...
 
struct  ValueHistogramWithBinningMHRWStatsCollectorResult
 Result type of a ValueHistogramWithBinningMHRWStatsCollector. More...
 

Typedefs

typedef MultipleMHRWStatsCollectors TrivialMHRWStatsCollector
 Trivial, NO-OP stats collector. More...
 

Enumerations

enum  
 

Functions

template<typename HistogramType >
void histogramPrettyPrint (std::ostream &str, const HistogramType &histogram, int max_width=0)
 pretty-print the given histogram. More...
 
template<typename HistogramType >
std::string histogramPrettyPrint (const HistogramType &histogram, int max_width=0)
 Utility to display histograms for humans. More...
 
template<typename HistogramType >
int histogramShortBar (std::ostream &str, const HistogramType &histogram, bool log_scale=true, int max_width=0)
 Format the histogram as a one-line bar. More...
 
template<typename HistogramType >
std::string histogramShortBar (const HistogramType &histogram, bool log_scale=true, int max_width=0)
 Format the histogram as a one-line bar. More...
 
template<typename HistogramType >
void histogramShortBarWithInfo (std::ostream &str, std::string head, const HistogramType &hist, std::string tail, bool log_scale=true, int full_max_width=0)
 Format the histogram as a one-line bar, with some surrounding info. More...
 
template<typename HistogramType >
std::string histogramShortBarWithInfo (std::string head, const HistogramType &hist, std::string tail, bool log_scale=true, int full_max_width=0)
 Format the histogram as a one-line bar, with some surrounding info. More...
 
template<typename CountIntType , typename StepRealType >
std::ostreamoperator<< (std::ostream &str, const MHRWParams< CountIntType, StepRealType > &p)
 

Variables

const double MHRWAcceptanceRatioRecommendedMin = 0.2
 Minimal recommended acceptance ratio.
 
const double MHRWAcceptanceRatioRecommendedMax = 0.4
 Maximal recommended acceptance ratio.
 

Detailed Description

Base namespace for the Tomographer project.

This namespace contains the public API for the Tomographer project template library.

Typedef Documentation

§ TrivialMHRWStatsCollector

Trivial, NO-OP stats collector.

The minimal interface to a MHRWStatsCollector Interface which does absolutely nothing.

Definition at line 212 of file mhrwstatscollectors.h.

Enumeration Type Documentation

§ anonymous enum

anonymous enum
Enumerator
MHUseFnValue 

Provides the MH function value at each point (see Role of UseFnSyntaxType)

MHUseFnLogValue 

Provides the logarithm MH function value at each point (see Role of UseFnSyntaxType)

MHUseFnRelativeValue 

Provides directly the ratio of the function values for two consecutive points of the MH random walk (see Role of UseFnSyntaxType)

Definition at line 60 of file mhrw.h.

Function Documentation

§ histogramPrettyPrint() [1/2]

template<typename HistogramType >
void Tomographer::histogramPrettyPrint ( std::ostream str,
const HistogramType &  histogram,
int  max_width = 0 
)
inline

pretty-print the given histogram.

This overload dumps the pretty print into the ostream str.

If max_width <= 0, then the screen width (or default width) minus the given amount in absolute value is used. The negative amount is useful if your line is already occupied by some content.

Definition at line 1229 of file histogram.h.

§ histogramPrettyPrint() [2/2]

template<typename HistogramType >
std::string Tomographer::histogramPrettyPrint ( const HistogramType &  histogram,
int  max_width = 0 
)
inline

Utility to display histograms for humans.

This version of the function returns a formatted std::string.

If max_width <= 0, then the screen width (or default width) minus the given amount in absolute value is used. The negative amount is useful if your line is already occupied by some content.

Definition at line 1251 of file histogram.h.

§ histogramShortBar() [1/2]

template<typename HistogramType >
int Tomographer::histogramShortBar ( std::ostream str,
const HistogramType &  histogram,
bool  log_scale = true,
int  max_width = 0 
)
inline

Format the histogram as a one-line bar.

Produces a one-line visual representation of the histogram. The histogram is printed in the given std::ostream.

There's no final newline.

If max_width <= 0, then the screen width (or default width) minus the given amount in absolute value is used. The negative amount is useful if your line is already occupied by some content.

Returns
The number of characters which are still left to fill a line with maximal width. More precisely, the maximum width is first determined from max_width and/or from the COLUMNS environment variable. Then histogram is formatted into a bar which fits in this width. The difference between the maximum width and the histogram length is returned.

Definition at line 1276 of file histogram.h.

§ histogramShortBar() [2/2]

template<typename HistogramType >
std::string Tomographer::histogramShortBar ( const HistogramType &  histogram,
bool  log_scale = true,
int  max_width = 0 
)
inline

Format the histogram as a one-line bar.

Produces a one-line visual representation of the histogram. Returns a std::string.

There's no final newline.

If max_width <= 0, then the screen width (or default width) minus the given amount in absolute value is used. The negative amount is useful if your line is already occupied by some content.

Definition at line 1304 of file histogram.h.

§ histogramShortBarWithInfo() [1/2]

template<typename HistogramType >
void Tomographer::histogramShortBarWithInfo ( std::ostream str,
std::string  head,
const HistogramType &  hist,
std::string  tail,
bool  log_scale = true,
int  full_max_width = 0 
)
inline

Format the histogram as a one-line bar, with some surrounding info.

Produces a one-line visual representation of the histogram, streamed into an std::ostream. The bar is surrounded by some info, given as two strings head and tail. A final newline is inserted.

More precisely, this function outputs head, then the histogram bar, and then tail, while ensuring that the full width of everything reaches exactly full_max_width. If max_width <= 0, then the screen width (or default width) minus the given amount in absolute value is used instead. The negative amount is useful if your line is already occupied by some content.

See also histogramShortBarWithInfo(std::string, const HistogramType&, std::string, bool, int)

Definition at line 1332 of file histogram.h.

§ histogramShortBarWithInfo() [2/2]

template<typename HistogramType >
std::string Tomographer::histogramShortBarWithInfo ( std::string  head,
const HistogramType &  hist,
std::string  tail,
bool  log_scale = true,
int  full_max_width = 0 
)
inline

Format the histogram as a one-line bar, with some surrounding info.

Produces a one-line visual representation of the histogram, returned as a string. The bar is surrounded by some info, given as two strings head and tail. A final newline is inserted.

More precisely, this function outputs head, then the histogram bar, and then tail, while ensuring that the full width of everything reaches exactly full_max_width. If max_width <= 0, then the screen width (or default width) minus the given amount in absolute value is used instead. The negative amount is useful if your line is already occupied by some content.

See also histogramShortBarWithInfo(std::ostream&, std::string, const HistogramType&, std::string, bool, int)

Definition at line 1361 of file histogram.h.