@Test public void testAverageFactory() { RouterLevelHistogram rlh = RouterLevelHistogram.makeAverageHistogram(histogram); assertEquals(3, rlh.size()); assertEquals(-22.7f, rlh.get("00:01:02:03:04:05"), 0.00001); assertEquals(-42f, rlh.get("a0:b0:c0:d0:e0:f0"), 0.00001); assertEquals(-38.3f, rlh.get("01:23:45:67:89:ab"), 0.00001); }
public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } RouterLevelHistogram(final RouterLevelHistogram rlh);  RouterLevelHistogram(); }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } RouterLevelHistogram(final RouterLevelHistogram rlh);  RouterLevelHistogram(); int intersect(final RouterLevelHistogram rlh); static RouterLevelHistogram makeMedianHistogram(final Histogram histogram); static RouterLevelHistogram makeAverageHistogram(final Histogram histogram); static RouterLevelHistogram makeNormalizedHistogram(final RouterLevelHistogram histogram); }
RouterLevelHistogram extends HashMap<String, Float> { public static RouterLevelHistogram makeAverageHistogram(final Histogram histogram) { final RouterLevelHistogram rlh = new RouterLevelHistogram(); for (Map.Entry<String, Map<Integer, Float>> accessPoint : histogram.entrySet()) { rlh.put(accessPoint.getKey(), calculateWeightedAverageLevel(accessPoint.getValue())); } return rlh; } RouterLevelHistogram(final RouterLevelHistogram rlh);  RouterLevelHistogram(); int intersect(final RouterLevelHistogram rlh); static RouterLevelHistogram makeMedianHistogram(final Histogram histogram); static RouterLevelHistogram makeAverageHistogram(final Histogram histogram); static RouterLevelHistogram makeNormalizedHistogram(final RouterLevelHistogram histogram);  }