mcmc_proposal Derived Type

type, public :: mcmc_proposal

Defines a type responsible for generating a proposal state for a Monte-Carlo, Markov-Chain sampler.


Contents


Type-Bound Procedures

procedure, public :: generate_sample => mp_gen

  • private subroutine mp_gen(this, tgt, xc, xp, vc, vp, err)

    Creates a new sample proposal.

    Arguments

    Type IntentOptional Attributes Name
    class(mcmc_proposal), intent(inout) :: this

    The mcmc_proposal object.

    class(mcmc_target), intent(inout) :: tgt

    The mcmc_target object.

    real(kind=real64), intent(in), dimension(:) :: xc

    An N-element array containing the existing parameter estimates.

    real(kind=real64), intent(out), dimension(:) :: xp

    An N-element array where the proposed parameters will be output.

    real(kind=real64), intent(in) :: vc

    The current variance (noise) term value.

    real(kind=real64), intent(out) :: vp

    The proposed variance (noise) value.

    class(errors), intent(inout), optional, target :: err

    An error handling object.

procedure, public :: get_recenter => mp_get_recenter

  • private pure function mp_get_recenter(this) result(rst)

    Gets a value determining if the parameter distributions should be recentered about the last stored position upon sampling.

    Arguments

    Type IntentOptional Attributes Name
    class(mcmc_proposal), intent(in) :: this

    The mcmc_proposal object.

    Return Value logical

    True if recentering is to be allowed; else, false.

procedure, public :: set_recenter => mp_set_recenter

  • private subroutine mp_set_recenter(this, x)

    Sets a value determining if the parameter distributions should be recentered about the last stored position upon sampling.

    Arguments

    Type IntentOptional Attributes Name
    class(mcmc_proposal), intent(inout) :: this

    The mcmc_proposal object.

    logical, intent(in) :: x

    True if recentering is to be allowed; else, false.