|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Poisson
public class Poisson
A random number generator based on the Poisson distribution.
NOTE: This is an updated version that fixes a bug in
Sim_poisson_obj.sample()
method. In the previous version, it always return a zero value.
Constructor Summary | |
---|---|
Poisson(String name,
double mean)
Constructor with which Sim_system is allowed to
set the random number generator's seed |
|
Poisson(String name,
double mean,
long seed)
The constructor with which a specific seed is set for the random number generator |
Method Summary | |
---|---|
String |
get_name()
Get the random number generator's name. |
long |
get_seed()
Get the random number generator's seed. |
long |
sample()
Generate a new random number. |
(package private) static long |
sample(Sim_random_obj source,
double mean)
Generate a new random number. |
void |
set_seed(long seed)
Set the random number generator's seed. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Poisson(String name, double mean)
Sim_system
is allowed to
set the random number generator's seed
name
- The name to be associated with this instancemean
- The mean of the distributionpublic Poisson(String name, double mean, long seed)
name
- The name to be associated with this instancemean
- The mean of the distributionseed
- The initial seed for the generator, two instances with
the same seed will generate the same sequence of numbersMethod Detail |
---|
public long sample()
sample
in interface DiscreteGenerator
static long sample(Sim_random_obj source, double mean)
public void set_seed(long seed)
set_seed
in interface Generator
seed
- The new seed for the generatorpublic long get_seed()
get_seed
in interface Generator
public String get_name()
get_name
in interface Generator
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |