MCParticles

MCParticles.DynamicParticleType
DynamicParticle{T} <: Particle{T}
  • x Location of particle
  • ℓw Log weight of particle (possibly unnormalised)
  • ℓdens Log density function
  • τ Temperature (or index) for ℓdens
  • cacheℓdens Cache of log density at current temperature (or index)
source
MCParticles.ParticleMethod
Particle(x::T, w::Real, ℓdens::Function, τ::Real, logweight::Bool = false) where {T<:Any}

Explicit constructor for Particle with type DynamicParticle. Auto calculates cached log density cacheℓdens

  • x Location of particle
  • w Weight of particle (possibly unnormalised)
  • ℓdens Log density function
  • τ Temperature (or index) for ℓdens

logweight Is w on log scale? Default is false

source
MCParticles.ParticleMethod
Particle(x::T, w::Real, logweight::Bool = false) where {T<:Any}

Explicit constructor for Particle with type StaticParticle.

  • x Location of particle
  • w Weight of particle (possibly unnormalised)
  • logweight Is w on log scale? Default is false
source
MCParticles.mutateMethod
mutate(p::DynamicParticle{T}, x::T, τ::Real = p.τ) where {T<:Any}

Mutate a particle - update the location.

- ```p``` Particle to update
- ```x``` New location of particle
- ```τ``` New temperature (or index) for ℓdens (defaults to old temperature)
source
MCParticles.mutateMethod
mutate(p::StaticParticle{T}, x::T) where {T<:Any}

Mutate a particle - update the location.

  • p Particle to update
  • x New location of particle
source
MCParticles.reweightMethod
reweight(p::StaticParticle{T}, w::Real, logweight = false) where {T<:Any}

Reweight a particle - update the weight.

  • p Particle to update
  • w New weight of particle
  • logweight Is w on log scale? Default is false
source