code: public static <E> void subtractInPlace(double[] target, Counter<E> arg, Index<E> idx) {
      for (Map.Entry<E, Double> entry : arg.entrySet()) {
        target[idx.indexOf(entry.getKey())] -= entry.getValue();
      }
    }
docs: Sets each value of double[] target to be
  target[idx.indexOf(k)]-a.getCount(k) for all keys k in arg