MCParticles
MCParticles.DynamicParticle
MCParticles.Particle
MCParticles.Particle
MCParticles.Particle
MCParticles.StaticParticle
MCParticles.mutate
MCParticles.mutate
MCParticles.reweight
MCParticles.DynamicParticle
— TypeDynamicParticle{T} <: Particle{T}
x
Location of particleℓw
Log weight of particle (possibly unnormalised)ℓdens
Log density functionτ
Temperature (or index) for ℓdenscacheℓdens
Cache of log density at current temperature (or index)
MCParticles.Particle
— TypeParticle{T}
An abstract type with subtypes
- StaticParticle{T}
- DynamicParticle{T}
MCParticles.Particle
— MethodParticle(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 particlew
Weight of particle (possibly unnormalised)ℓdens
Log density functionτ
Temperature (or index) for ℓdens
– logweight
Is w
on log scale? Default is false
MCParticles.Particle
— MethodParticle(x::T, w::Real, logweight::Bool = false) where {T<:Any}
Explicit constructor for Particle with type StaticParticle
.
x
Location of particlew
Weight of particle (possibly unnormalised)logweight
Isw
on log scale? Default isfalse
MCParticles.StaticParticle
— TypeStaticParticle{T} <: Particle{T}
x
Location of particleℓw
Log weight of particle (possibly unnormalised)
MCParticles.mutate
— Methodmutate(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)
MCParticles.mutate
— Methodmutate(p::StaticParticle{T}, x::T) where {T<:Any}
Mutate a particle - update the location.
p
Particle to updatex
New location of particle
MCParticles.reweight
— Methodreweight(p::StaticParticle{T}, w::Real, logweight = false) where {T<:Any}
Reweight a particle - update the weight.
p
Particle to updatew
New weight of particlelogweight
Isw
on log scale? Default isfalse