org.encog.mathutil.randomize
Class RandomChoice

java.lang.Object
  extended by 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)


Copyright © 2012. All Rights Reserved.