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 2fe34c1 commit 388066bCopy full SHA for 388066b
src/samplers.jl
@@ -100,6 +100,14 @@ MetaSampler(; kw...) = MetaSampler(NamedTuple(kw))
100
101
sample(s::MetaSampler, t) = map(x -> sample(x, t), s.samplers)
102
103
+function Base.iterate(s::SampleGenerator{<:MetaSampler})
104
+ if length(s.traces) > 0
105
+ sample(s.sampler, s.traces), nothing
106
+ else
107
+ nothing
108
+ end
109
+end
110
+
111
#####
112
# MultiBatchSampler
113
@@ -128,6 +136,14 @@ end
128
136
129
137
sample(m::MultiBatchSampler, t) = [sample(m.sampler, t) for _ in 1:m.n]
130
138
139
+function Base.iterate(s::SampleGenerator{<:MultiBatchSampler})
140
141
142
143
144
145
146
131
147
132
148
# NStepBatchSampler
133
149
0 commit comments