RankProbabilitySummary extends AbstractObservable implements MCMCResultsListener, Summary { public double getValue(Treatment t, int rank) { if (!d_ready) { return 0.0; } int rIdx = d_n - rank; int tIdx = d_treatments.indexOf(t); return d_rankProbability[tIdx][rIdx]; } RankProbabilitySummary(MCMCResults results, List<Treatment> treatments);  RankProbabilitySummary(double[][] rankProbabilityMatrix, List<Treatment> treatments); void resultsEvent(MCMCResultsEvent event); List<Treatment> getTreatments(); double getValue(Treatment t, int rank); boolean getDefined(); static final String PROPERTY_VALUE; }
@Test public void testResults() { d_results.makeSamplesAvailable(); assertEquals(0.268, d_summary.getValue(d_ta, 3), 0.001); assertEquals(0.566, d_summary.getValue(d_ta, 2), 0.001); assertEquals(0.166, d_summary.getValue(d_ta, 1), 0.001); assertEquals(0.150, d_summary.getValue(d_tb, 3), 0.001); assertEquals(0.204, d_summary.getValue(d_tb, 2), 0.001); assertEquals(0.646, d_summary.getValue(d_tb, 1), 0.001); assertEquals(0.582, d_summary.getValue(d_tc, 3), 0.001); assertEquals(0.230, d_summary.getValue(d_tc, 2), 0.001); assertEquals(0.188, d_summary.getValue(d_tc, 1), 0.001); }