public class DistributionManager extends NamedObject
Constructor and Description |
---|
DistributionManager(java.lang.String name,
long seed)
Creates a new distributionManager with the given name and the given
initial seed for the seed-generator.
|
Modifier and Type | Method and Description |
---|---|
void |
deRegister(Distribution dist)
De-registers a distribution from the experiment.
|
java.util.List<Distribution> |
getDistributions()
Returns a list containing all distributions.
|
long |
getSeed()
Returns the initial seed.
|
void |
newSeedAll()
Provides all registered distributions with new seed values, thus
resetting all distribution statistics at the same time.
|
long |
nextSeed()
Returns a new seed value to be used as an initial seed for registered
distributions.
|
void |
register(Distribution dist)
Registers a new distribution at the experiment to control antithetic mode
and set random seed values.
|
void |
resetAll()
Resets all registered distributions.
|
void |
setAntitheticAll(boolean antitheticMode)
Sets antithetic mode to true on all registered distributions regardless
of their previous status.
|
void |
setRandomNumberGenerator(java.lang.Class<? extends UniformRandomGenerator> randomNumberGenerator)
Sets the underlying pseudo random number generator to be used by all
distributions created from now on.
|
void |
setSeed(long newSeed)
Sets the seed of the SeedGenerator to the given value.
|
getName, getQuotedName, toString
public DistributionManager(java.lang.String name, long seed)
name
- java.lang.String : The distributionmanager's nameseed
- long : The initial seed for the seedgeneratorpublic void deRegister(Distribution dist)
dist
- desmoj.dist.Distribution : The distribution to be deregisteredpublic void newSeedAll()
public long nextSeed()
public void register(Distribution dist)
dist
- desmoj.dist.Distribution : The distribution to be registeredpublic void resetAll()
public void setAntitheticAll(boolean antitheticMode)
antitheticMode
- boolean : The new status of antithetic modepublic void setSeed(long newSeed)
newSeed
- long : The new seed for the seedgeneratorpublic long getSeed()
public void setRandomNumberGenerator(java.lang.Class<? extends UniformRandomGenerator> randomNumberGenerator)
randomNumberGenerator
- Class : The random number generator class to be usedLinearCongruentialRandomGenerator
,
UniformRandomGenerator
public java.util.List<Distribution> getDistributions()