docs: protected void loadCache(int size, InputStream in) throws IOException {
      // Expect a sparse matrix here
      cache = new Long2FloatOpenHashMap(size * 20);
      cache.defaultReturnValue(Float.POSITIVE_INFINITY);
      min = Integer.MAX_VALUE;
      max = Integer.MIN_VALUE;
      parser.parse(in, new DistanceCacheWriter() {
        @Override
        public void put(int id1, int id2, double distance) {
          if(id1 < id2) {
            min = id1 < min ? id1 : min;
            max = id2 > max ? id2 : max;
          }
          else {
            min = id2 < min ? id2 : min;
            max = id1 > max ? id1 : max;
          }
          cache.put(makeKey(id1, id2), (float) distance);
        }
      });
      if(min != 0) {
        LOG.verbose("Distance matrix is supposed to be 0-indexed. Choosing offset " + min + " to compensate.");
      }
      if(max + 1 - min != size) {
        LOG.warning("ID range is not consistent with relation size.");
      }
    }