docs: private static double[][] denseMeans(List<? extends DBIDs> clusters, double[][] means, Relation<? extends NumberVector> relation) {
      final int k = means.length;
      double[][] newMeans = new double[k][];
      for(int i = 0; i < newMeans.length; i++) {
        DBIDs list = clusters.get(i);
        if(list.isEmpty()) {
          // Keep degenerated means as-is for now.
          // TODO: allow the user to choose the behavior.
          newMeans[i] = means[i];
          continue;
        }
        DBIDIter iter = list.iter();
        // Initialize with first.
        double[] sum = relation.get(iter).toArray();
        // Update with remaining instances
        for(iter.advance(); iter.valid(); iter.advance()) {
          plusEquals(sum, relation.get(iter));
        }
        newMeans[i] = timesEquals(sum, 1.0 / list.size());
      }
      return newMeans;
    }