Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
This is a ‘type interface.’ See Type Interfaces for more info on what that is.
A type implementing a MHRWStatsCollector interface is responsible for collecting statistics from samples during a Metropolis-Hastings random walk (see Tomographer::MHRandomWalk).
This type must provide the following members. The members, or the class itself, must be templates with type parameters CountIntType
, PointType
, FnValueType
, and MHRandomWalk
. (It is usually most convenient to template the methods themselves, so that you don't have to specify the parameters when instantiating the object.)
process_sample()
instead.k
is the iteration number (which is reset to zero after the thermalizing sweeps), is_thermalizing
is true
during the first part of the random walk during the thermalizing runs, is_live_iter
is set to true
only if a sample is taken at this point, i.e. if not thermalizing and after a full sweep. accepted
indicates whether this Metropolis-Hastings move was accepted or not and a
gives the ratio of the function which was tested for the move. (Note that a
might not be calculated and left to 1 if known to be greater than 1.) newpt
and newptval
are the new proposal jump point and the function value at that new point. The function value is either the actual value of the function, or its logarithm, or a dummy value, depending on MHWalker::UseFnSyntaxType
. Similarly curpt
and curptval
are the current point and function value. The object rw
is a reference to the random walk object instance.