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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomChoice
public RandomChoice(double[] theProbabilities)
- Construct a list of probabilities.
- Parameters:
theProbabilities - The probability of each item in the list.
generate
public static boolean generate(double p)
generate
public int generate()
generate
public int generate(int skip)
Copyright © 2012. All Rights Reserved.