docs: public void writeClusters(OutputStreamWriter outStream, MultipleObjectsBundle data) throws IOException {
      int modelcol = -1;
      { // Find model column
        for(int i = 0; i < data.metaLength(); i++) {
          if(Model.TYPE.isAssignableFromType(data.meta(i))) {
            modelcol = i;
            break;
          }
        }
      }
      if(modelcol < 0) {
        throw new AbortException("No model column found in bundle.");
      }
      ArrayList<Model> models = new ArrayList<>();
      Map<Model, IntArrayList> modelMap = new HashMap<>();
      { // Build a map from model to the actual objects
        for(int i = 0; i < data.dataLength(); i++) {
          Model model = (Model) data.data(i, modelcol);
          IntArrayList modelids = modelMap.get(model);
          if(modelids == null) {
            models.add(model);
            modelids = new IntArrayList();
            modelMap.put(model, modelids);
          }
          modelids.add(i);
        }
      }
      // compute global discard values
      int totalsize = 0, totaldisc = 0;
      for(Entry<Model, IntArrayList> ent : modelMap.entrySet()) {
        totalsize += ent.getValue().size();
        if(ent.getKey() instanceof GeneratorSingleCluster) {
          totaldisc += ((GeneratorSingleCluster) ent.getKey()).getDiscarded();
        }
      }
      double globdens = (double) (totalsize + totaldisc) / totalsize;
      outStream.append("########################################################").append(LINE_SEPARATOR);
      outStream.append("## Number of clusters: " + models.size()).append(LINE_SEPARATOR);
      for(Model model : models) {
        IntArrayList ids = modelMap.get(model);
        outStream.append("########################################################").append(LINE_SEPARATOR);
        outStream.append("## Size: " + ids.size()).append(LINE_SEPARATOR);
        if(model instanceof GeneratorSingleCluster) {
          GeneratorSingleCluster cursclus = (GeneratorSingleCluster) model;
          outStream.append("########################################################").append(LINE_SEPARATOR);
          outStream.append("## Cluster: ").append(cursclus.getName()).append(LINE_SEPARATOR);
          double[] cmin = cursclus.getClipmin();
          double[] cmax = cursclus.getClipmax();
          if(cmin != null && cmax != null) {
            outStream.append("## Clipping: ").append(FormatUtil.format(cmin))//
            .append(" - ").append(FormatUtil.format(cmax)).append(LINE_SEPARATOR);
          }
          outStream.append("## Density correction factor: " + cursclus.getDensityCorrection()).append(LINE_SEPARATOR);
          outStream.append("## Generators:").append(LINE_SEPARATOR);
          for(int i = 0; i < cursclus.getDim(); i++) {
            Distribution gen = cursclus.getDistribution(i);
            outStream.append("##   ").append(gen.toString()).append(LINE_SEPARATOR);
          }
          if(cursclus.getTransformation() != null && cursclus.getTransformation().getTransformation() != null) {
            outStream.append("## Affine transformation matrix:").append(LINE_SEPARATOR);
            outStream.append(FormatUtil.format(cursclus.getTransformation().getTransformation(), "## ")).append(LINE_SEPARATOR);
          }
          outStream.append("## Discards: " + cursclus.getDiscarded() + " Retries left: " + cursclus.getRetries()).append(LINE_SEPARATOR);
          double corf = /* cursclus.overweight */(double) (cursclus.getSize() + cursclus.getDiscarded()) / cursclus.getSize() / globdens;
          outStream.append("## Density correction factor estimation: " + corf).append(LINE_SEPARATOR);
        }
        outStream.append("########################################################").append(LINE_SEPARATOR);
        for(IntIterator iter = ids.iterator(); iter.hasNext();) {
          int num = iter.nextInt();
          for(int c = 0; c < data.metaLength(); c++) {
            if(c != modelcol) {
              if(c > 0) {
                outStream.append(' ');
              }
              outStream.append(data.data(num, c).toString());
            }
          }
          outStream.append(LINE_SEPARATOR);
        }
      }
    }