|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--utilities.TaemsRandom
This class defines a new TaemsRandom generator based on the Random for java.util.Random The only difference is, this classe, you can get the seed !
Constructor Summary | |
TaemsRandom()
|
|
TaemsRandom(long seed)
|
Method Summary | |
static TaemsRandom |
getDefault()
Gets the default log object |
long |
getSeed()
|
long |
getUniqID()
returns a Long Value used for Action/Commitment or any kind of uniq ID (completly indepedant of Taems). |
boolean |
isAnInteger(float value)
isAnInteger(float value) |
float |
nextFloat()
nextFloat returns a uniformly distributed number between 0 to 1.0 |
double |
nextGaussian()
nextGaussian returns a number between 0 to 1.0 from a gaussian distribution |
int |
nextInt()
nextInt returns a number between 0 to the sum |
float |
nextValue()
nextValue returns a value corresponding at the distribution |
static void |
setDefault(TaemsRandom r)
Sets the default Taems Random Number Generator |
void |
setDistribution(Distribution d)
setDistribution set the distribution for the TaemsRandom number (using the Distribution Structure) |
void |
setDistribution(float[] args)
setDistribution set the distribution for the TaemsRandom number the form is a pair of [ percentage value ] |
void |
unsetDistribution()
unsetDistribution to avoid concurrent access to the same Random structure |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TaemsRandom(long seed)
long
- seed is the seed for the random numberpublic TaemsRandom()
Method Detail |
public void setDistribution(Distribution d)
public void setDistribution(float[] args)
public void unsetDistribution()
public int nextInt()
public float nextFloat()
public double nextGaussian()
public float nextValue()
public boolean isAnInteger(float value)
public long getSeed()
public long getUniqID()
public static void setDefault(TaemsRandom r)
public static TaemsRandom getDefault()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |