Class RandomModule

  • All Implemented Interfaces:
    com.google.inject.Module

    public class RandomModule
    extends Opt4JModule
    The RandomModule is used to configure the used random number generator.
    • Constructor Detail

      • RandomModule

        public RandomModule()
    • Method Detail

      • config

        public void config()
        Description copied from class: Opt4JModule
        Configure the module. Bind constants, listeners, and bind arbitrary classes.
        Specified by:
        config in class Opt4JModule
        See Also:
        Binder
      • setSeed

        public void setSeed​(long seed)
        Sets the seed that is used by the random number generator.
        Parameters:
        seed - the seed that is used by the random number generator
        See Also:
        getSeed()
      • getSeed

        public long getSeed()
        Returns the seed the is used by the random number generator.
        Returns:
        the seed the is used by the random number generator
        See Also:
        setSeed(long)
      • setType

        public void setType​(RandomModule.RandType type)
        Sets the type of the random number generator to the specified value.
        Parameters:
        type - the type of the random number generator
        See Also:
        getType()
      • isUsingSeed

        public boolean isUsingSeed()
        Returns true if a specific seed is given.
        Returns:
        the useSeed
        See Also:
        setUsingSeed(boolean)
      • setUsingSeed

        public void setUsingSeed​(boolean value)
        Select if a specific seed should be used.
        Parameters:
        value - true if a seed shall be used, false otherwise
        See Also:
        isUsingSeed()