code: public double subtract(int[] indices, double val) {
          checkIndices(indices);
          int c = getConfigIdx(indices);
          double prev = values[c];
          values[c] = s.minus(values[c], val);
          return prev;
      }
docs: Subtracts the value to the entry corresponding to the given indices.
  @param indices The indices of the multi-dimensional array.
  @param val The value to subtract.
  @return The previous value.