code: public void set(int index, int value) {
          int cur = map.get(index);
          if (value == 0) {
              if (cur != 0)
                  map.remove(index);
          }
          else 
              map.put(index, value);
          magnitude = -1;
      }
docs: {@inheritDoc}