MeanWalker
Public Member Functions

meanwalker::MetropolisHistogramBuilder Class Reference

This class uses the Metropolis-Hastings method to take samples from a probability distribution and automatically creates histograms for the marginalized distributions corresponding to each of the coordinates. More...

#include <metropolishistogrambuilder.h>

Inheritance diagram for meanwalker::MetropolisHistogramBuilder:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 MetropolisHistogramBuilder (RandomNumberGenerator *pRndGen)
 The constructor of the class, in which the random number generator to be used must be specified.
bool init (Function *pProbFunction, const double *pMinCoords, const double *pMaxCoords, const double *pStartCoords, size_t numBins, bool keepInside=true, bool delayed=false)
 Initialize the builder.

Detailed Description

This class uses the Metropolis-Hastings method to take samples from a probability distribution and automatically creates histograms for the marginalized distributions corresponding to each of the coordinates.

This class uses the Metropolis-Hastings method to take samples from a probability distribution and automatically creates histograms for the marginalized distributions corresponding to each of the coordinates. It uses a MetropolisWalker instance to take the samples.


Constructor & Destructor Documentation

meanwalker::MetropolisHistogramBuilder::MetropolisHistogramBuilder ( RandomNumberGenerator pRndGen)

The constructor of the class, in which the random number generator to be used must be specified.


Member Function Documentation

bool meanwalker::MetropolisHistogramBuilder::init ( Function pProbFunction,
const double *  pMinCoords,
const double *  pMaxCoords,
const double *  pStartCoords,
size_t  numBins,
bool  keepInside = true,
bool  delayed = false 
)

Initialize the builder.

Initialize the builder.

Parameters:
pProbFunctionThe probability density to be sampled.
pMinCoordsSets the minimum coordinates which are used together with the maximum coordinates to calculate the scale of the steps used in the random walk.
pMaxCoordsSets the maximum coordinates which are used together with the minimum coordinates to calculate the scale of the steps used in the random walk.
pStartCoordsIf not null, the walker will start at these coordinates. If null, a random position between pMinCoords and pMaxCoords is used as starting point.
numBinsNumber of bins the histograms will have.
keepInsideIf true, the random walk is not allowed to go beyond the boundaries specified by the minimum coordinates. If false, the walker can go outside these bounds. In that case the boundaries are only used to calculate the step size.
delayedIf false, the minimum and maximum coordinates will be used as the histogram boundaries. If true, the widths of the histograms will be determined automatically.

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