Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pokersource.enumerate
Class HoldemHandOrdering

    java.lang.Object
      org.pokersource.enumerate.HandValuation
          org.pokersource.enumerate.HoldemHandOrdering

    public class HoldemHandOrdering

extends HandValuation

Defines an ordering (from 'weakest' to 'strongest') of holdem hand groups. Staring with a sequence of disjoint hand groups G_i (i=1..N), assigns to each group G_i a numeric value equal to the fraction of all atomic hands in groups G_1 through G_{i-1}. A typical usage is define the G_i as the 169 canonical hand groups.

Author:
  Michael Maurer <mjmaurer@yahoo.com>

Field Summary
`private static int` | `TOTAL_HANDS`

Constructor Summary
`HoldemHandOrdering(java.io.InputStream stream)`
`HoldemHandOrdering(java.lang.String path)`

Method Summary
`void` | `fromFile(java.lang.String path)` Subclasses should implement this according to their own file format.
`void` | `fromStream(java.io.InputStream stream)` Populates self from an input stream.
`static void` | `main(java.lang.String[] args)`

Methods inherited from class org.pokersource.enumerate.HandValuation
`getValue, greater, greaterEqual, less, lessEqual, setValue, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### TOTAL_HANDS

    private static final int TOTAL_HANDS

See Also:
  Constant Field Values

Constructor Detail

### HoldemHandOrdering

    public HoldemHandOrdering(java.lang.String path)
                       throws java.io.IOException

Throws:
  `java.io.IOException`

### HoldemHandOrdering

    public HoldemHandOrdering(java.io.InputStream stream)
                       throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### fromStream

    public void fromStream(java.io.InputStream stream)
                    throws java.io.IOException

  Populates self from an input stream. The format is a text file with whitespace separated tokens; each token represents a hand group. Comments begin with the '#' character and are terminated by end of line. The first hand group in the file is the 'least' or 'weakest'; the last hand group in the file is the 'greatest' or 'strongest'. The hand groups must be disjoint and their union must include all 1326 atomic holdem hands.

  Overrides:
    `fromStream` in class `HandValuation`
  Throws:
    `java.io.IOException`

### fromFile

    public void fromFile(java.lang.String path)
                  throws java.io.IOException

  Description copied from class: `HandValuation`
  Subclasses should implement this according to their own file format.

  Overrides:
    `fromFile` in class `HandValuation`
  Throws:
    `java.io.IOException`
  See Also:
    `fromStream(InputStream)`

### main

    public static void main(java.lang.String[] args)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD