public void testFilteringWithParticleSetsWorksForRainmanHmm() {
Randomizer r = new MockRandomizer(new double[] { 0.1, 0.2, 0.3, 0.4,
0.5, 0.6, 0.7, 0.8, 0.9 });
ParticleSet starting = rainman.prior().toParticleSet(rainman, r, 100);
Assert.assertEquals(56,
starting.numberOfParticlesWithState(HmmConstants.RAINING));
Assert.assertEquals(44,
starting.numberOfParticlesWithState(HmmConstants.NOT_RAINING));
ParticleSet afterSeeingUmbrella = starting.filter(
HmmConstants.SEE_UMBRELLA, r);