code: public double magnitude() {
          double m = 0;
          int length = length();
          for (int i = 0; i < length; ++i) {
              double d = getValue(i).doubleValue();
              m += d * d;
          }
          return Math.sqrt(m);
      }
docs: {@inheritDoc}