@Test public void testResultsCalculatedOnAvailable() { ConvergenceSummary cs = new ConvergenceSummary(d_results, d_parameters[0]); d_results.makeSamplesAvailable(); double convergence = GelmanRubinConvergence.diagnose(d_results, d_parameters[0]); assertEquals(convergence, cs.getScaleReduction(), 0.0); }
@Test public void testCalculations() { d_results.makeSamplesAvailable(); ConvergenceSummary cs = new ConvergenceSummary(d_results, d_parameters[0]); assertEquals(true, cs.getDefined()); assertEquals( GelmanRubinConvergence.diagnose(d_results, d_parameters[0]), cs.getScaleReduction(), 0.0); }
@Test public void testResultsPreservedOnClear() { d_results.makeSamplesAvailable(); ConvergenceSummary cs = new ConvergenceSummary(d_results, d_parameters[0]); double convergence = GelmanRubinConvergence.diagnose(d_results, d_parameters[0]); d_results.clear(); assertEquals(true, cs.getDefined()); assertEquals(convergence, cs.getScaleReduction(), 0.0); }