code: public int get(int index) {
          if (index < 0 || index > length)
              throw new IndexOutOfBoundsException(
                  "index not within vector: " + index);
          if (Arrays.binarySearch(positiveDimensions, index) >= 0)
              return 1;
          if (Arrays.binarySearch(negativeDimensions, index) >= 0)
              return -1;
          return 0;
      }
docs: {@inheritDoc}.