docs: public static ArrayDBIDs[] randomSplit(DBIDs oids, int p, Random random) {
      // Fast, and we're single-threaded here anyway.
      random = random != null ? random : new FastNonThreadsafeRandom();
      ArrayModifiableDBIDs ids = newArray(oids);
      final int size = ids.size();
      ArrayDBIDs[] split = new ArrayDBIDs[p];
      // Shuffle
      for(int i = 1; i < size; i++) {
        ids.swap(i - 1, i + random.nextInt(size - i));
      }
      final int minsize = size / p, // Floor.
          extra = size % p; // Remainder
      for(int beg = 0, part = 0; part < p; part++) {
        // First partitions are smaller, last partitions are larger.
        final int psize = minsize + ((part < extra) ? 1 : 0);
        split[part] = ids.slice(beg, beg + psize);
        beg += psize;
      }
      return split;
    }