QuantileSummary extends AbstractObservable implements MCMCResultsListener, Summary { public double getProbability(int idx) { return d_probabilities[idx]; } QuantileSummary(MCMCResults results, Parameter parameter, double[] probabilities);  QuantileSummary(double[] probabilities, double[] quantiles);  QuantileSummary(MCMCResults results, Parameter parameter); void resultsEvent(MCMCResultsEvent event); int indexOf(double p); double getProbability(int idx); double getQuantile(int idx); int getSize(); boolean getDefined();  }
@Test public void testGetDefaultProbabilities() { QuantileSummary x = new QuantileSummary(d_results, d_results.getParameters()[0]); assertEquals(0.025, x.getProbability(0), 0.0); assertEquals(0.5, x.getProbability(1), 0.0); assertEquals(0.975, x.getProbability(2), 0.0); }
@Test public void testGetCustomProbabilities() { QuantileSummary x = new QuantileSummary(d_results, d_results.getParameters()[0], new double[] { 0.18, 0.25 }); assertEquals(0.18, x.getProbability(0), 0.0); assertEquals(0.25, x.getProbability(1), 0.0); }