code: public double add(int index, double delta) {
          double val = vector.get(index) + delta;
          if (val == 0) 
              vector.remove(index);        
          else
              set(index, val);
          nonZeroIndices = null;
          magnitude = -1;
          return val;
      }
docs: {@inheritDoc}