EmpiricalDensityDataset extends AbstractXYDataset { public double[] getDensities(int series) { return d_densities[series]; } EmpiricalDensityDataset(int nBins, PlotParameter ... parameters);  EmpiricalDensityDataset(int nBins, MCMCResults r, Parameter p); @Override int getSeriesCount(); @Override Comparable<String> getSeriesKey(int series); Double getX(int series, int bin); Double getY(int series, int bin); int[] getCounts(int series); double[] getDensities(int series); int getItemCount(int series);  }
@Test public void testDensities() throws IOException { d_results.makeSamplesAvailable(); EmpiricalDensityDataset edd = new EmpiricalDensityDataset(N_BINS, d_results, d_parameters[0]); double[] normDensities = readDensity(FILE_SINGLE_DENS, 0); assertArrayEquals(normDensities, edd.getDensities(0), EPSILON); }
@Test public void testDensitiesDynamic() throws IOException { EmpiricalDensityDataset edd = new EmpiricalDensityDataset(N_BINS, d_results, d_parameters[0]); d_results.makeSamplesAvailable(); double[] normDensities = readDensity(FILE_SINGLE_DENS, 0); assertArrayEquals(normDensities, edd.getDensities(0), EPSILON); }
@Test public void testMDSomeInitialized() throws IOException { FileResults results = readSamples(); d_results.makeSamplesAvailable(); EmpiricalDensityDataset edd = new EmpiricalDensityDataset(N_BINS, new PlotParameter(d_results, d_parameters[0]), new PlotParameter(d_results, d_parameters[1]), new PlotParameter(results , d_parameters[2])); double[] normDensities0 = readDensity(FILE_MULTI_DENS, 0); assertArrayEquals(normDensities0, edd.getDensities(0), EPSILON); double[] normDensities1 = readDensity(FILE_MULTI_DENS, 1); assertArrayEquals(normDensities1, edd.getDensities(1), EPSILON); double[] normDensities2 = new double[N_BINS]; assertArrayEquals(normDensities2, edd.getDensities(2), EPSILON); }