|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcern.colt.PersistentObject
cern.jet.random.tfloat.AbstractFloatDistribution
cern.jet.random.tfloat.AbstractContinousFloatDistribution
cern.jet.random.tfloat.FloatUniform
public class FloatUniform
Uniform distribution; Math definition and animated definition.
Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
Constructor Summary | |
---|---|
FloatUniform(float min,
float max,
FloatRandomEngine randomGenerator)
Constructs a uniform distribution with the given minimum and maximum. |
|
FloatUniform(float min,
float max,
int seed)
Constructs a uniform distribution with the given minimum and maximum, using a FloatMersenneTwister seeded
with the given seed. |
|
FloatUniform(FloatRandomEngine randomGenerator)
Constructs a uniform distribution with min=0.0 and max=1.0. |
Method Summary | |
---|---|
float |
cdf(float x)
Returns the cumulative distribution function (assuming a continous uniform distribution). |
boolean |
nextBoolean()
Returns a uniformly distributed random boolean. |
float |
nextFloat()
Returns a uniformly distributed random number in the open interval (min,max) (excluding min and max). |
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). |
float |
pdf(float x)
Returns the probability distribution function (assuming a continous uniform distribution). |
void |
setState(float min,
float max)
Sets the internal state. |
static boolean |
staticNextBoolean()
Returns a uniformly distributed random boolean. |
static float |
staticNextFloat()
Returns a uniformly distributed random number in the open interval (0,1) (excluding 0 and 1). |
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(FloatRandomEngine 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.tfloat.AbstractFloatDistribution |
---|
apply, apply, clone, makeDefaultGenerator |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FloatUniform(float min, float max, int seed)
FloatMersenneTwister
seeded
with the given seed.
public FloatUniform(float min, float max, FloatRandomEngine randomGenerator)
public FloatUniform(FloatRandomEngine randomGenerator)
Method Detail |
---|
public float cdf(float x)
public boolean nextBoolean()
public float nextFloat()
nextFloat
in class AbstractFloatDistribution
public float nextFloatFromTo(float from, float to)
public int nextInt()
nextInt
in class AbstractFloatDistribution
public int nextIntFromTo(int from, int to)
public long nextLongFromTo(long from, long to)
public float pdf(float x)
public void setState(float min, float max)
public static boolean staticNextBoolean()
public static float staticNextFloat()
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(FloatRandomEngine randomGenerator)
randomGenerator
- the new uniform random number generation engine to be shared.public String toString()
toString
in class Object
|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |