rv.getProbabilityOf(HmmConstants.NOT_RAINING), 0.001);
}
@Test
public void testRoundTripConversion() {
VarDistribution rv = particleSet.toRandomVariable();
Randomizer r = new MockRandomizer(new double[] { 0.1, 0.2, 0.3, 0.4,
0.9 });
ParticleSet ps2 = rv.toParticleSet(rainman, r, 10);
Assert.assertEquals(8,
ps2.numberOfParticlesWithState(HmmConstants.RAINING));
Assert.assertEquals(2,
ps2.numberOfParticlesWithState(HmmConstants.NOT_RAINING));
}