docs: public static DBIDs randomSample(DBIDs ids, double rate, Random random) {
      return rate <= 0 ? ids : // Magic for "no sampling"
          randomSample(ids, Math.min(ids.size(), //
              (int) (rate <= 1 ? rate * ids.size() : rate)), random);
    }