code: public static ArrayDBIDs[] randomSplit(DBIDs ids, int p, RandomFactory rnd) {
      return randomSplit(ids, p, rnd.getSingleThreadedRandom());
    }
docs: Randomly split IDs into {@code p} partitions of almost-equal size.
  
  @param ids Original DBIDs
  @param p Desired number of partitions.
  @param rnd Random generator