code: public static double computeAbsoluteDistance(Map<String, Double> h1, Map<String, Double> h2) {
          double distance = 0;
  
          final Set<String> keySet = new HashSet();
          keySet.addAll(h1.keySet());
          keySet.addAll(h2.keySet());
  
          for (String key : keySet) {
              double v1 = 0.0;
              double v2 = 0.0;
              if (h1.get(key) != null) {
                  v1 = h1.get(key);
              }
              if (h2.get(key) != null) {
                  v2 = h2.get(key);
              }
  
              distance += Math.abs(v1 - v2);
          }
  
          return distance;
      }
docs: compares two histograms and returns the accumulated number of differences (absolute)
  
  @param h1
  @param h2
  @return