Particle filtering methods for dynamic and static bayesian problems