AdvancedPS.jl
AdvancedPS.jl copied to clipboard
`PGAS` requires an empty state vector to start with
There is an issue with the way we handle inner state container in PG and PGAS. For a model like this:
mutable struct Model
States::Vector{Float64}
end
PGAS would require the constructor of Model to create an empty array and the sampler would push new states / values into it.
For PG, that's the opposite. We need to start with a pre-allocated array (like zeros(T, N)).
https://github.com/TuringLang/AdvancedPS.jl/pull/80#discussion_r1328727017