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.encog.mathutil.randomize
Class RandomChoice

    java.lang.Object
      org.encog.mathutil.randomize.RandomChoice

    public class RandomChoice

extends Object

Generate random choices unevenly. This class is used to select random choices from a list, with a probability weight places on each item in the list.

Constructor Summary
`RandomChoice(double[] theProbabilities)` Construct a list of probabilities.

Method Summary
`int` | `generate()`
`static boolean` | `generate(double p)`
`int` | `generate(int skip)`

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

Constructor Detail

### RandomChoice

    public RandomChoice(double[] theProbabilities)

  Construct a list of probabilities.

  Parameters:
    `theProbabilities` - The probability of each item in the list.

Method Detail

### generate

    public static boolean generate(double p)

### generate

    public int generate()

### generate

    public int generate(int skip)

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

Copyright © 2012. All Rights Reserved.