// --------------------------------------------------------------------
  private void bucketize(
      List<BucketTree.Branch> prevBuckets, Round round, char[] numBuckets, int[] maxBuckets) {
    int subBucketCounts[] =
        allocateBuckets(prevBuckets, numBuckets[round.ordinal()], maxBuckets[round.ordinal()]);
    LOG.debug("allocated: " + Arrays.toString(subBucketCounts));

    BUCKETIZER.setThorough(true);
    for (int prevBucketIndex = 0; prevBucketIndex < prevBuckets.size(); prevBucketIndex++) {
      BUCKETIZER.bucketize(prevBuckets.get(prevBucketIndex), subBucketCounts[prevBucketIndex]);
    }

    if (round == Round.RIVER) return;
    List<BucketTree.Branch> subBranches = new ArrayList<BucketTree.Branch>();
    for (BucketTree.Branch prevBucket : prevBuckets) {
      subBranches.addAll(prevBucket.subBranches());
    }
    bucketize(subBranches, round.next(), numBuckets, maxBuckets);
  }
Beispiel #2
0
 public static char nodeCount(PathToFlop path, Round round) {
   return nextId[path.ordinal()][round.ordinal() - 1];
 }
Beispiel #3
0
 public static char intentCount(Round intentRound) {
   return nextIntent[intentRound.ordinal()];
 }
Beispiel #4
0
 private static char nextId(PathToFlop path, Round round) {
   if (path == null) return nextPreflopId++;
   if (round == null) return nextPostflopTerminalId++;
   return nextId[path.ordinal()][round.ordinal() - 1]++;
 }
Beispiel #5
0
 // --------------------------------------------------------------------
 private static char nextIntent(Round prevRound) {
   return prevRound == null ? (char) -1 : nextIntent[prevRound.ordinal()]++;
 }