code: @Override
      public void add(int idx, double val) {
          int i = Arrays.binarySearch(indices, 0, used, idx);
          if (i >= 0) {
              // Just add to the existing value.
              values[i] += val;
              return;
          } 
          int insertionPoint = -(i + 1);
          indices = insert(indices, insertionPoint, idx);
          values = insert(values, insertionPoint, val);
          used++;
      }
docs: /* (non-Javadoc)
  @see edu.jhu.util.vector.IntDoubleMap#put(int, double)