MCPcopy Create free account
hub / github.com/apache/nutch / normalize

Method normalize

src/java/org/apache/nutch/util/Histogram.java:65–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 }
64
65 public Histogram<E> normalize() {
66 Histogram<E> normalized = new Histogram<E>();
67 Set<E> keys = getKeys();
68 for (E x : keys) {
69 normalized.add(x, getValue(x) / totalValue);
70 }
71 return normalized;
72 }
73
74 public List<E> sortInverseByValue() {
75 List<Map.Entry<E, HistogramEntry>> list = new Vector<Map.Entry<E, HistogramEntry>>(

Callers

nothing calls this directly

Calls 3

getKeysMethod · 0.95
addMethod · 0.95
getValueMethod · 0.95

Tested by

no test coverage detected