|
ContactCenters V. 0.9.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectumontreal.iro.lecuyer.contactcenters.RandomValueGenerator
public class RandomValueGenerator
Implements the ValueGenerator interface when the values come from a
continuous and possibly non-stationary distribution. For each period and
contact type, a different random variate generator can be used to get a
value. This class can be instantiated the same way a
ConstantValueGenerator is constructed, replacing constants with
random variate generators.
| Constructor Summary | |
|---|---|
RandomValueGenerator(int numTypes,
RandomVariateGen gen)
Constructs a new random stationary value generator with generator gen for each contact type, and supporting numTypes contact types. |
|
RandomValueGenerator(PeriodChangeEvent pce,
int numTypes,
RandomVariateGen[] gens)
Constructs a new random value generator with period-change event pce, generator gens[p] for period p, and supporting numTypes contact types. |
|
RandomValueGenerator(PeriodChangeEvent pce,
RandomVariateGen[][] gens)
Constructs a new random value generator with period-change event pce and random variate generators gens. |
|
RandomValueGenerator(RandomVariateGen[] gens)
Constructs a new random stationary value generator with generator gens[k] for contact type k. |
|
| Method Summary | |
|---|---|
RandomVariateGen[][] |
getRandomVariateGens()
Returns the array of random variate generators associated with this object. |
void |
init()
Initializes the generator at the beginning of the simulation. |
double |
nextDouble(Contact contact)
Generates and returns a new value for the contact contact. |
void |
setRandomVariateGens(RandomVariateGen[][] gens)
Sets the random variate generators for this object to gens. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RandomValueGenerator(int numTypes,
RandomVariateGen gen)
numTypes - the number of supported contact types.gen - the random variate generator used for all contact types.public RandomValueGenerator(RandomVariateGen[] gens)
gens - the random variate generators used by this object.
public RandomValueGenerator(PeriodChangeEvent pce,
int numTypes,
RandomVariateGen[] gens)
pce - the associated period-change event.numTypes - the number of supported contact types.gens - the array containing a generator for each period.
IllegalArgumentException - if a generator is not specified for each period.
public RandomValueGenerator(PeriodChangeEvent pce,
RandomVariateGen[][] gens)
pce - the associated period-change event.gens - the array of generators for each period and contact type.
IllegalArgumentException - if an array of generators is not specified for each period.| Method Detail |
|---|
public RandomVariateGen[][] getRandomVariateGens()
RandomValueGenerator(PeriodChangeEvent,RandomVariateGen[][]).
public void setRandomVariateGens(RandomVariateGen[][] gens)
gens - the new random variate generators for this object.
IllegalArgumentException - if the length of the given array is incorrect.public double nextDouble(Contact contact)
ValueGeneratorNullPointerException.
nextDouble in interface ValueGeneratorcontact - the contact being concerned.
public void init()
ValueGenerator
init in interface Initializableinit in interface ValueGeneratorpublic String toString()
toString in class Object
|
ContactCenters V. 0.9.9. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||