MeanWalker
Public Member Functions

meanwalker::GoodmanWeareHistogramBuilder Class Reference

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

#include <goodmanwearehistogrambuilder.h>

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

List of all members.

Public Member Functions

 GoodmanWeareHistogramBuilder (RandomNumberGenerator *pRng)
 The constructor of the class, in which the random number generator to be used must be specified.
bool init (Function *pProbFunction, const double *pStartCoordCenter, double startCoordRadius, size_t numBins, const double *pHistMinCoords=0, const double *pHistMaxCoords=0, double a=2.0, int Nwalkers=0)
 Initialize the builder.
bool init (Function *pProbFunction, const double *pStartCoordCenter, const double *pStartCoordRadii, size_t numBins, const double *pHistMinCoords=0, const double *pHistMaxCoords=0, double a=2.0, int Nwalkers=0)
 Initialize the builder.

Detailed Description

This class uses the Goodman-Weare 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 Goodman-Weare 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 GoodmanWeareWalkers instance to take the samples.


Constructor & Destructor Documentation

meanwalker::GoodmanWeareHistogramBuilder::GoodmanWeareHistogramBuilder ( RandomNumberGenerator pRng)

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


Member Function Documentation

bool meanwalker::GoodmanWeareHistogramBuilder::init ( Function pProbFunction,
const double *  pStartCoordCenter,
double  startCoordRadius,
size_t  numBins,
const double *  pHistMinCoords = 0,
const double *  pHistMaxCoords = 0,
double  a = 2.0,
int  Nwalkers = 0 
)

Initialize the builder.

Initialize the builder.

Parameters:
pProbFunctionThe probability density to be sampled.
pStartCoordCenterIf the number of dimensions is larger than one, the starting coordinates of the walkers will be chosen randomly on a hypersphere with this center. In the dimension is equal to one, the walkers will be placed randomly in the interval [center-radius, center+radius].
startCoordRadiusRadius of the hypersphere, or size of the interval (see previous parameter).
numBinsNumber of bins the histograms will have.
pHistMinCoordsIf not null, this specifies the minimum coordinates of the histograms. This does not impose a minimum coordinate a walker can have. If null, the width of the histograms will be determined automatically.
pHistMaxCoordsIf not null, this specifies the maximum coordinates of the histograms. Again, this does not impose a maximum coordinate a walker can have. If null, the width of the histograms will be determined automatically.
aScale factor for the stretch move from the Goodman-Weare algorithm.
NwalkersThe number of walkers which will sample the probability distribution. Must be at least one more than the dimension, which is also the default value (specified when setting this parameter to 0).
bool meanwalker::GoodmanWeareHistogramBuilder::init ( Function pProbFunction,
const double *  pStartCoordCenter,
const double *  pStartCoordRadii,
size_t  numBins,
const double *  pHistMinCoords = 0,
const double *  pHistMaxCoords = 0,
double  a = 2.0,
int  Nwalkers = 0 
)

Initialize the builder.

Initialize the builder.

Parameters:
pProbFunctionThe probability density to be sampled.
pStartCoordCenterIf the number of dimensions is larger than one, the starting coordinates of the walkers will be chosen randomly on a hypersphere, or rather a hyperellipsoid, with this center. In the dimension is equal to one, the walkers will be placed randomly in the interval [center-radius, center+radius].
pStartCoordRadiiRadii of of the hyperellipsoid along each axis, or size of the interval (see previous parameter).
numBinsNumber of bins the histograms will have.
pHistMinCoordsIf not null, this specifies the minimum coordinates of the histograms. This does not impose a minimum coordinate a walker can have. If null, the width of the histograms will be determined automatically.
pHistMaxCoordsIf not null, this specifies the maximum coordinates of the histograms. Again, this does not impose a maximum coordinate a walker can have. If null, the width of the histograms will be determined automatically.
aScale factor for the stretch move from the Goodman-Weare algorithm.
NwalkersThe number of walkers which will sample the probability distribution. Must be at least one more than the dimension, which is also the default value (specified when setting this parameter to 0).

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