Class mcmc_stepper_rw (o2scl)

O2scl : Class List

template<class func_t, class data_t, class vec_t>
class mcmc_stepper_rw : public o2scl::mcmc_stepper_base<func_t, data_t, vec_t>

A simple random-walk stepper for MCMC.

Public Functions

inline virtual const char *step_type()

Stepper type, “RW”.

inline mcmc_stepper_rw()
inline virtual ~mcmc_stepper_rw()
inline virtual void write_params(o2scl_hdf::hdf_file &hf)

Write stepper parameters to the HDF5 file.

inline virtual void step(size_t i_thread, size_t n_params, func_t &f, vec_t &current, vec_t &next, double w_current, double &w_next, vec_t &low, vec_t &high, int &func_ret, bool &accept, data_t &dat, rng<> &r, int verbose)

Construct a step.

This function constructs next and w_next, the next point and log weight in parameter space. The objective function f is then evaluated at the new point, the return value is placed in func_ret, and the step acceptance or rejection is stored in accept.

Public Members

vec_t step_fac

The factor controlling the step size (default is a 1-element vector containing 2.0)