BayesianLogic / blog

The BLOG programming language
http://bayesianlogic.github.io/
BSD 4-Clause "Original" or "Old" License
98 stars 31 forks source link

upgrade the resample algorithm in ParticleFilter #312

Closed jxwuyi closed 9 years ago

jxwuyi commented 9 years ago

Replace the super slow O(n^2) algorithm with a new one which requires only a quick-sort and a linear scan.

jxwuyi commented 9 years ago

@lileicc @cberzan

For ar1.blog model with 1000 timestep and 10000 particles, the running time reduces from 311s to 264s on my laptop.

lileicc commented 9 years ago

LGTM