src/services/Vectors.java
BeforeProposed
+1−1
33public final class Vectors {
44 public static SortedMap<String,Integer> join(Map<String,Integer> left,Map<String,Integer> right) {
55 SortedMap<String,Integer> result=new TreeMap<>();
6 for (String actor:left.keySet()) result.put(actor,Math.min(left.get(actor),right.get(actor)));
6 for (String actor:left.keySet()) result.put(actor,Math.max(left.get(actor),right.get(actor)));
77 return result;
88 }
99 public static boolean dominates(Map<String,Integer> left,Map<String,Integer> right) {