We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 262f96f commit ebeee8eCopy full SHA for ebeee8e
src/inference/particle_filter.jl
@@ -23,6 +23,16 @@ mutable struct ParticleFilterState{U}
23
parents::Vector{Int}
24
end
25
26
+function Base.copy(state::ParticleFilterState{U}) where U
27
+ ParticleFilterState{U}(
28
+ copy(state.traces),
29
+ copy(state.new_traces),
30
+ copy(state.log_weights),
31
+ state.log_ml_est,
32
+ copy(state.parents)
33
+ )
34
+end
35
+
36
"""
37
traces = get_traces(state::ParticleFilterState)
38
0 commit comments