Tomographer  v5.3
Tomographer C++ Framework Documentation
MHRWAcceptanceRatioBasedParamsAdjuster Interface

A MHRWAcceptanceRatioBasedParamsAdjuster is responsible for modifying the parameters of the random walk MHWalker (i.e., the MHWalkerParams), in order to correct for an acceptance ratio which is not in the required interval.

This type interface allows to abstract out the correction of the parameters when using a Tomographer::MHRWAcceptRatioWalkerParamsController. For correcting a step size, you can use the ready-to-use Tomographer::MHRWStepSizeController.

Objects complying with this type interface should provide the following members:

void initParams(MHRWParamsType & params, const MHWalker & mhwalker, const MHRandomWalkType & mhrw)
Callback which is called at the beginning of the random walk. params may be modified, but really only to just set default values if needed. Other controllers may also have the opportunity to do an initialization of the params, so any precise params setting should be done in the other callback below.
void adjustParamsForAcceptRatio(MHRWParamsType & params, double accept_ratio, const MHRWAcceptRatioWalkerParamsControllerType & controller, const MHWalker & mhwalker, IterCountIntType iter_k, const MHRandomWalkType & mhrw)
Correct the params to keep the accept_ratio in the desired interval. The desired and acceptable interval for the acceptance ratio are available via controller as controller.desiredAcceptanceRatioMin() etc. (see Tomographer::MHRWAcceptRatioWalkerParamsController). The remaining arguments are given for convenience.