public class RandomModule extends Opt4JModule
RandomModule is used to configure the used random number
generator.| Modifier and Type | Class and Description |
|---|---|
static class |
RandomModule.RandType
|
| Modifier and Type | Field and Description |
|---|---|
protected long |
seed |
protected RandomModule.RandType |
type |
protected boolean |
usingSeed |
SINGLETON| Constructor and Description |
|---|
RandomModule() |
| Modifier and Type | Method and Description |
|---|---|
void |
config()
Configure the module.
|
long |
getSeed()
Returns the seed the is used by the random number generator.
|
RandomModule.RandType |
getType()
Returns the type of the random number generator.
|
boolean |
isUsingSeed()
Returns
true if a specific seed is given. |
void |
setSeed(long seed)
Sets the seed that is used by the random number generator.
|
void |
setType(RandomModule.RandType type)
Sets the type of the random number generator to the specified value.
|
void |
setUsingSeed(boolean value)
Select if a specific seed should be used.
|
addControlListener, addIndividualStateListener, addOptimizerIterationListener, addOptimizerStateListener, bindConstant, bindConstant, bindConstant, bindConstant, configure, constant, multiaddError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBindingprotected long seed
protected boolean usingSeed
protected RandomModule.RandType type
public void config()
Opt4JModuleconfig in class Opt4JModuleBinderpublic void setSeed(long seed)
seed - the seed that is used by the random number generatorgetSeed()public long getSeed()
setSeed(long)public void setType(RandomModule.RandType type)
type - the type of the random number generatorgetType()public RandomModule.RandType getType()
setType(org.opt4j.core.common.random.RandomModule.RandType)public boolean isUsingSeed()
true if a specific seed is given.setUsingSeed(boolean)public void setUsingSeed(boolean value)
value - true if a seed shall be used, false otherwiseisUsingSeed()