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();
    }
  }
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 ( ) ; } }
Sets each value of double[] target to be
target[idx.indexOf(k)]-a.getCount(k) for all keys k in arg