docs: private long[][] findDimensions(ArrayDBIDs medoids, Relation<V> database, DistanceQuery<V> distFunc, RangeQuery<V> rangeQuery) {
      // get localities
      DataStore<DBIDs> localities = getLocalities(medoids, distFunc, rangeQuery);
  
      // compute x_ij = avg distance from points in l_i to medoid m_i
      final int dim = RelationUtil.dimensionality(database);
      final int numc = medoids.size();
      double[][] averageDistances = new double[numc][];
  
      for(DBIDArrayIter iter = medoids.iter(); iter.valid(); iter.advance()) {
        V medoid_i = database.get(iter);
        DBIDs l_i = localities.get(iter);
        double[] x_i = new double[dim];
        for(DBIDIter qr = l_i.iter(); qr.valid(); qr.advance()) {
          V o = database.get(qr);
          for(int d = 0; d < dim; d++) {
            x_i[d] += Math.abs(medoid_i.doubleValue(d) - o.doubleValue(d));
          }
        }
        for(int d = 0; d < dim; d++) {
          x_i[d] /= l_i.size();
        }
        averageDistances[iter.getOffset()] = x_i;
      }
  
      List<DoubleIntInt> z_ijs = computeZijs(averageDistances, dim);
      return computeDimensionMap(z_ijs, dim, numc);
    }