Class mcmc_stepper_rw (o2scl)¶
-
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 ¤t, 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
andw_next
, the next point and log weight in parameter space. The objective functionf
is then evaluated at the new point, the return value is placed infunc_ret
, and the step acceptance or rejection is stored inaccept
.
-
inline virtual const char *step_type()¶