Skip to content

Commit

Permalink
got rid of alias_sample
Browse files Browse the repository at this point in the history
  • Loading branch information
zsunberg committed May 20, 2017
1 parent 8af2299 commit b3865c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 22 deletions.
3 changes: 2 additions & 1 deletion src/ParticleFilters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import POMDPs: generate_s
import POMDPs: implemented
import Base: rand, mean, eltype

using StatsBase

export
AbstractParticleBelief,
ParticleCollection,
Expand Down Expand Up @@ -189,7 +191,6 @@ end
include("beliefs.jl")
include("updater.jl")
include("resamplers.jl")
include("alias_sample.jl")
include("obs_weight.jl")

end # module
20 changes: 0 additions & 20 deletions src/alias_sample.jl

This file was deleted.

2 changes: 1 addition & 1 deletion src/resamplers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function resample{S}(r::ImportanceResampler, b::WeightedParticleBelief{S}, rng::
warn("Invalid weights in particle filter: weight_sum = $(weight_sum(b))")
end
#XXX this may break if StatsBase changes
alias_sample!(rng, particles(b), weights(b), weight_sum(b), ps)
StatsBase.alias_sample!(rng, particles(b), Weights(weights(b), weight_sum(b)), ps)
return ParticleCollection(ps)
end

Expand Down

0 comments on commit b3865c8

Please sign in to comment.