ProbabilityDistributions { static public <T> Map<T, Double> generateUniformDistribution( Collection<T> objects) { Map<T, Double> inital = new HashMap<T, Double>(); return generateUniformDistribution(objects, inital); }  static Double calculateLabelCost(String calcLabel,
			Map<String, Double> labelProbabilities, CostMatrix<String> costMatrix); static Map<T, Double> generateConstantDistribution(
		Collection<T> objects, double value); static Map<T, Double> generateUniformDistribution(
		Collection<T> objects); static Map<T, Double> generateUniformDistribution(
		Collection<T> objects, Map<T, Double> initialDistribution); static Map<String, Double> generateGoldDistribution(Collection<String> categories, String correctCat);  }
@Test public void testGenerateUniformDistribution() { Collection<String> objects = new LinkedList<String>(); for (int i = 0; i < 8; i++) { objects.add("" + i); } Map<String, Double> result = ProbabilityDistributions.generateUniformDistribution(objects); for (String s : objects) { assertEquals(1. / 8, result.get(s), 0.0); } }