abstract type AbstractEstimator{State} end struct ImportanceEstimator{S, P <: Real} <: AbstractEstimator{S} states::Vector{S} logprobs::Vector{Vector{P}} rejections::Vector{Int} end #estimate(q::Q) = levels = length.(logprobs) for l = 1:L s = states[(levels .== l)] mean(s) end