Exemplo n.º 1
0
  static int calculateWorstCaseH(int clusterSize, int partitionCount) {
    final ArrayList<Integer> counts = Lists.newArrayList();

    for (int partition = 0; partition < partitionCount; partition++) {
      counts.add(
          clusterSize / partitionCount + (partition < (clusterSize % partitionCount) ? 1 : 0));
    }

    return calculateH(counts);
  }