|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LaraRandom
Field Summary | |
---|---|
static String |
NORMAL_DEFAULT
Identifier for default normal stream (not necessarily standard!) |
static String |
UNIFORM_DEFAULT
Identifier for default uniform stream |
Method Summary | |
---|---|
Normal |
createNormal(double mean,
double stdDev)
Create a normal distribution with the given parameters using the default random generator. |
Normal |
getCustomNormal(double mean,
double std,
String name)
|
AbstractDistribution |
getDistribution(String name)
Returns the AbstractDistribution that is registered for the given
name. |
RandomEngine |
getGenerator(String name)
|
Normal |
getNormal()
Returns the Normal distribution that was created at last
(therefore, mean and standard deviation is not defined). |
int |
getSeed()
Get the seed currently used for the default distributions. |
Uniform |
getUniform()
Return the default uniform distribution. |
boolean |
isDebugEnabled()
Checks if the logger of LRandomService is set to debug. |
void |
registerDistribution(AbstractDistribution dist,
String name)
Registers a custom AbstractDistribution at the given name. |
void |
registerGenerator(String name,
RandomEngine generator)
|
void |
setSeed(int seed)
Sets the seed for all random number generators. |
Field Detail |
---|
static final String NORMAL_DEFAULT
static final String UNIFORM_DEFAULT
Method Detail |
---|
Normal createNormal(double mean, double stdDev)
mean
- stdDev
-
Normal getCustomNormal(double mean, double std, String name)
mean
- std
- name
- name of the generator to use from stored generators
AbstractDistribution getDistribution(String name)
AbstractDistribution
that is registered for the given
name.
name
-
RandomEngine getGenerator(String name)
name
-
Normal getNormal()
Normal
distribution that was created at last
(therefore, mean and standard deviation is not defined). Equivalent to
LaraRandom#getDistribution(LaraRandom.NORMAL_DEFAULT)
.
Returns null if no normal distribution has been created yet.
int getSeed()
Uniform getUniform()
LaraRandom#getDistribution(LaraRandom.UNIFORM_DEFAULT)
.
boolean isDebugEnabled()
void registerDistribution(AbstractDistribution dist, String name)
AbstractDistribution
at the given name.
dist
- name
- void registerGenerator(String name, RandomEngine generator)
name
- to associte the given generator withgenerator
- to registervoid setSeed(int seed)
seed
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |