Tomographer
v1.0a
Tomographer C++ Framework Documentation
|
Base class performing an abstract random walk. More...
#include <tomographer/mhrw.h>
Public Types | |
typedef RandomWalk_ | RandomWalk |
typedef RandomWalk::CountIntType | CountIntType |
Static Public Member Functions | |
static void | run (RandomWalk &rw) |
Run the random walk. (pun intended) More... | |
Base class performing an abstract random walk.
This class takes care to update the state of a random walk for it to perform thermalizing sweeps, followed by "live" runs.
The random walk is composed of iterations. There are n_sweep
iterations per "sweep". This number should be approximately chosen such that step_size
* n_sweep is of order of the size of the state space. (This is in order to better decorrelate the samples.)
Initially, a number n_therm
thermalizing sweeps are performed. No samples are taken during this period, and this is meant for a Metropolis random walk to find its "valley".
After the thermalizing runs, a number of run sweeps are performed, in which a live sample is taken at the last iteration of each sweep.
This class doesn't actually keep the state of the random walk, nor does it have any notion about which space is being explored. All of this is delegated to an object instance of type RandomWalk, which must implement the RandomWalk type interface (see RandomWalk Interface).
You might not even need to refer to this class directly. For example, you can call directly DMStateSpaceRandomWalk::run().
|
inlinestatic |
Run the random walk. (pun intended)
This will repeatedly call move()
on the random walk object rw, first a number of times for the thermalizing runs, then a number of times for the "live" runs. The corresponding callbacks in rw will be called as documented in RandomWalk Interface and in this class documentation.