org.pokersource.enum
Class ThresholdHandGroup
java.lang.Object
org.pokersource.enum.BaseHandGroup
org.pokersource.enum.ThresholdHandGroup
- All Implemented Interfaces:
- java.lang.Comparable, HandGroup
- Direct Known Subclasses:
- HoldemThresholdGroup
public class ThresholdHandGroup
- extends BaseHandGroup
Given a mapping from hand groups G_i to numeric values, this class allows
you to build a new hand group as the union of those G_i whose numeric
values are less than or greater than a certain threshold. For example, you
could assign a numeric 'strength' to each canonical hand G_i and then
create a new group consisting of those G_i whose strength exceeds some
minimum value.
- Author:
- Michael Maurer <mjmaurer@yahoo.com>
Constructor Summary |
ThresholdHandGroup(java.lang.String groupSpec)
Create a set of hands corresponding to those whose value compares either
less than or greater than a threshold value, where the value of each
hand is defined by a HandValuation. |
Method Summary |
static void |
main(java.lang.String[] args)
|
static void |
registerHandValuation(java.lang.String valuationName,
HandValuation valuation)
Register a new HandValuation that will be referred to as valuationName. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ThresholdHandGroup
public ThresholdHandGroup(java.lang.String groupSpec)
- Create a set of hands corresponding to those whose value compares either
less than or greater than a threshold value, where the value of each
hand is defined by a HandValuation.
- Parameters:
groupSpec
- Defines a hand valuation, a threshold value, and a
comparator. The hand valuation is referred to by a string previously
registered with registerHandValuation(). The threshold value is a
number in decimal form. The comparator is one of '<', '<=', '>', '>='.
registerHandValuation
public static void registerHandValuation(java.lang.String valuationName,
HandValuation valuation)
- Register a new HandValuation that will be referred to as valuationName.
For example, if you register a valuation as 'MYVAL', one can later
instantiate a hand group using a syntax like 'MYVAL>0.80'; the hand
group will include all hands to which the registered valuation assigns
a numeric value greater than 0.80.
main
public static void main(java.lang.String[] args)
PokerSource Home Page - Learn how you can contribute!