Skip to content
Permalink
3b99e145f5
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
19 lines (11 sloc) 314 Bytes
package utils;
import java.util.Map.Entry;
import util.AutoMap;
public class MapUtils {
public static void normalizeAutoMap(AutoMap<Integer, Double> m) {
double denominator = m.sumValues().doubleValue();
for(Entry<Integer, Double> e: m.entrySet()){
e.setValue(e.getValue()/denominator);
}
}
}