|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cern.colt.PersistentObject cern.jet.random.AbstractDistribution cern.jet.random.AbstractContinousDistribution cern.jet.random.Uniform
Uniform distribution; Math definition and animated definition.
Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
Field Summary |
Fields inherited from class cern.colt.PersistentObject |
serialVersionUID |
Constructor Summary | |
Uniform(double min,
double max,
int seed)
Constructs a uniform distribution with the given minimum and maximum, using a MersenneTwister seeded with the given seed. |
|
Uniform(double min,
double max,
RandomEngine randomGenerator)
Constructs a uniform distribution with the given minimum and maximum. |
|
Uniform(RandomEngine randomGenerator)
Constructs a uniform distribution with min=0.0 and max=1.0. |
Method Summary | |
double |
cdf(double x)
Returns the cumulative distribution function (assuming a continous uniform distribution). |
boolean |
nextBoolean()
Returns a uniformly distributed random boolean. |
double |
nextDouble()
Returns a uniformly distributed random number in the open interval (min,max) (excluding min and max). |
double |
nextDoubleFromTo(double from,
double to)
Returns a uniformly distributed random number in the open interval (from,to) (excluding from and to). |
float |
nextFloatFromTo(float from,
float to)
Returns a uniformly distributed random number in the open interval (from,to) (excluding from and to). |
int |
nextInt()
Returns a uniformly distributed random number in the closed interval [min,max] (including min and max). |
int |
nextIntFromTo(int from,
int to)
Returns a uniformly distributed random number in the closed interval [from,to] (including from and to). |
long |
nextLongFromTo(long from,
long to)
Returns a uniformly distributed random number in the closed interval [from,to] (including from and to). |
double |
pdf(double x)
Returns the probability distribution function (assuming a continous uniform distribution). |
void |
setState(double min,
double max)
Sets the internal state. |
static boolean |
staticNextBoolean()
Returns a uniformly distributed random boolean. |
static double |
staticNextDouble()
Returns a uniformly distributed random number in the open interval (0,1) (excluding 0 and 1). |
static double |
staticNextDoubleFromTo(double from,
double to)
Returns a uniformly distributed random number in the open interval (from,to) (excluding from and to). |
static float |
staticNextFloatFromTo(float from,
float to)
Returns a uniformly distributed random number in the open interval (from,to) (excluding from and to). |
static int |
staticNextIntFromTo(int from,
int to)
Returns a uniformly distributed random number in the closed interval [from,to] (including from and to). |
static long |
staticNextLongFromTo(long from,
long to)
Returns a uniformly distributed random number in the closed interval [from,to] (including from and to). |
static void |
staticSetRandomEngine(RandomEngine randomGenerator)
Sets the uniform random number generation engine shared by all static methods. |
String |
toString()
Returns a String representation of the receiver. |
Methods inherited from class cern.jet.random.AbstractDistribution |
apply, apply, clone, makeDefaultGenerator |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Uniform(double min, double max, int seed)
MersenneTwister
seeded with the given seed.
public Uniform(double min, double max, RandomEngine randomGenerator)
public Uniform(RandomEngine randomGenerator)
Method Detail |
public double cdf(double x)
public boolean nextBoolean()
public double nextDouble()
nextDouble
in class AbstractDistribution
public double nextDoubleFromTo(double from, double to)
public float nextFloatFromTo(float from, float to)
public int nextInt()
nextInt
in class AbstractDistribution
public int nextIntFromTo(int from, int to)
public long nextLongFromTo(long from, long to)
public double pdf(double x)
public void setState(double min, double max)
public static boolean staticNextBoolean()
public static double staticNextDouble()
public static double staticNextDoubleFromTo(double from, double to)
public static float staticNextFloatFromTo(float from, float to)
public static int staticNextIntFromTo(int from, int to)
public static long staticNextLongFromTo(long from, long to)
public static void staticSetRandomEngine(RandomEngine randomGenerator)
randomGenerator
- the new uniform random number generation engine to be shared.public String toString()
|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |