docs: static double assignRemainingToNearestCluster(ArrayDBIDs means, DBIDs ids, DBIDs rids, WritableIntegerDataStore assignment, DistanceQuery<?> distQ) {
      rids = DBIDUtil.ensureSet(rids); // Ensure we have fast contains
      double distsum = 0.;
      DBIDArrayIter miter = means.iter();
      for(DBIDIter iditer = distQ.getRelation().iterDBIDs(); iditer.valid(); iditer.advance()) {
        if(rids.contains(iditer)) {
          continue;
        }
        double mindist = Double.POSITIVE_INFINITY;
        int minIndex = 0;
        miter.seek(0); // Reuse iterator.
        for(int i = 0; miter.valid(); miter.advance(), i++) {
          double dist = distQ.distance(iditer, miter);
          if(dist < mindist) {
            minIndex = i;
            mindist = dist;
          }
        }
        distsum += mindist;
        assignment.put(iditer, minIndex);
      }
      return distsum;
    }