Class mcmc_stepper_mh (o2scl)¶
-
template<class func_t, class data_t, class vec_t, class mat_t = boost::numeric::ublas::matrix<double>, class prop_t = o2scl::prob_cond_mdim_gaussian<vec_t, mat_t>>
class mcmc_stepper_mh : public o2scl::mcmc_stepper_base<func_t, data_t, vec_t>¶ Metropolis Hastings for MCMC with a proposal distribution.
Public Functions
-
inline virtual const char *step_type()¶
Stepper type, “MH”.
-
inline mcmc_stepper_mh()¶
-
inline virtual ~mcmc_stepper_mh()¶
-
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()¶