// -------------------------------------------------------------------- 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); }
public static char nodeCount(PathToFlop path, Round round) { return nextId[path.ordinal()][round.ordinal() - 1]; }
public static char intentCount(Round intentRound) { return nextIntent[intentRound.ordinal()]; }
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]++; }
// -------------------------------------------------------------------- private static char nextIntent(Round prevRound) { return prevRound == null ? (char) -1 : nextIntent[prevRound.ordinal()]++; }