docs: private static double[][] sparseMeans(List<? extends DBIDs> clusters, double[][] means, Relation<? extends SparseNumberVector> relation) {
      final int k = means.length;
      double[][] newMeans = new double[k][];
      for(int i = 0; i < k; i++) {
        DBIDs list = clusters.get(i);
        if(list.isEmpty()) {
          // Keep degenerated means as-is for now.
          newMeans[i] = means[i];
          continue;
        }
        DBIDIter iter = list.iter();
        // Initialize with first.
        double[] mean = relation.get(iter).toArray();
        // Update with remaining instances
        for(iter.advance(); iter.valid(); iter.advance()) {
          SparseNumberVector vec = relation.get(iter);
          for(int j = vec.iter(); vec.iterValid(j); j = vec.iterAdvance(j)) {
            mean[vec.iterDim(j)] += vec.iterDoubleValue(j);
          }
        }
        newMeans[i] = timesEquals(mean, 1.0 / list.size());
      }
      return newMeans;
    }