Block


A smallest unit that is needed for blocking.

DiffusionMCMCTools.BlockType
mutable struct Block{L,TGP,TGPl,TW,TWn,TX}
    PP::TVIEW{TGP}
    P_last::TVIEW{TGPl} # view into a single element
    WW::TVIEW{TW}
    Wnr::TWn
    XX::TVIEW{TX}
    ll::Float64
    ll_history::Vector{Float64}
end

The smallest "containerless" unit that provides a view into SamplingUnit restricted to a range i:j of a block. L is an important flag that indicates whether it is a terminal block or not.

Fields


  • PP: a vector of views into relevant GuidProp
  • P_last: a view into a single (or none) GuidProp corresponding to the terminal sub-interval.
  • WW: a vector of views into containers for sampled Wiener process
  • Wnr: a flag for sampling Wiener processes
  • XX: a vector of views into containers for a sampled process
  • ll: a placeholder for computed log-likelihood
  • ll_history: a history of computed log-likelihoods (useful for MCMC)
function Block(
    u::SamplingUnit,
    range::UnitRange{Int64},
    last_block=false,
    ll_hist_len=0
)

Base constructor.

source

It is rarely used on its own. Instead, it is used mainly as a building block of other, composite units. Nevertheless, there are a couple of useful functions implemented for it: