Tomographer  v1.0a
Tomographer C++ Framework Documentation
Tomographer::RandomWalkBase< RandomWalk_ > Struct Template Reference

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...
 

Detailed Description

template<typename RandomWalk_>
struct Tomographer::RandomWalkBase< RandomWalk_ >

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).

Note
You should not instantiate this class. Just call its static run() method.

You might not even need to refer to this class directly. For example, you can call directly DMStateSpaceRandomWalk::run().

Definition at line 85 of file mhrw.h.

Member Function Documentation

template<typename RandomWalk_ >
static void Tomographer::RandomWalkBase< RandomWalk_ >::run ( RandomWalk &  rw)
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.

Definition at line 97 of file mhrw.h.


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