code: @Override public double magnitude() {
          if (magnitude < 0) {
              magnitude = 0;
              TIntIterator iter = map.valueCollection().iterator();
              while (iter.hasNext()) {
                  int i = iter.next();
                  magnitude += i*i;
              }
              magnitude = Math.sqrt(magnitude);
          }
          return magnitude;
      }
docs: {@inheritDoc} This value is cached and recomputed as needed when the
  vector changes.