randoop.util
Class Randomness

Object
  extended by Randomness

public final class Randomness
extends Object


Field Summary
Modifier and Type Field and Description
static long SEED
           
static int totalCallsToRandom
           
 
Method Summary
Modifier and Type Method and Description
static boolean nextRandomBool()
           
static int nextRandomInt(int i)
          Uniformly random int from [0, i)
static boolean randomBoolFromDistribution(double falseProb_, double trueProb_)
           
static
<T> T
randomMember(List<T> list)
           
static
<T> T
randomMember(SimpleList<T> list)
           
static
<T extends WeightedElement>
T
randomMemberWeighted(SimpleList<T> list)
           
static
<T> T
randomSetMember(Collection<T> set)
           
static void reset(long newSeed)
           
static boolean weighedCoinFlip(double trueProb)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEED

public static final long SEED
See Also:
Constant Field Values

totalCallsToRandom

public static int totalCallsToRandom
Method Detail

reset

public static void reset(long newSeed)

nextRandomBool

public static boolean nextRandomBool()

nextRandomInt

public static int nextRandomInt(int i)
Uniformly random int from [0, i)


randomMember

public static <T> T randomMember(List<T> list)

randomMember

public static <T> T randomMember(SimpleList<T> list)

randomMemberWeighted

public static <T extends WeightedElement> T randomMemberWeighted(SimpleList<T> list)

randomSetMember

public static <T> T randomSetMember(Collection<T> set)

weighedCoinFlip

public static boolean weighedCoinFlip(double trueProb)

randomBoolFromDistribution

public static boolean randomBoolFromDistribution(double falseProb_,
                                                 double trueProb_)