Class AbstractRandomNumberGenerator<T extends Number>

    • Constructor Detail

      • AbstractRandomNumberGenerator

        public AbstractRandomNumberGenerator()
    • Method Detail

      • check

        protected void check()
        Performs optional checks.

        Default implementation does nothing.
      • doNext

        protected abstract T doNext()
        Returns the next random number. Does the actual computation.
        Returns:
        the next number
      • shallowCopy

        public AbstractRandomNumberGenerator shallowCopy​(boolean expand)
        Returns a shallow copy of itself, i.e., based on the commandline options.
        Specified by:
        shallowCopy in interface ShallowCopySupporter<T extends Number>
        Parameters:
        expand - whether to expand variables to their current values
        Returns:
        the shallow copy
      • getGenerators

        public static String[] getGenerators()
        Returns a list with classnames of statistics.
        Returns:
        the statistic classnames
      • forName

        public static AbstractRandomNumberGenerator forName​(String classname,
                                                            String[] options)
        Instantiates the statistic with the given options.
        Parameters:
        classname - the classname of the statistic to instantiate
        options - the options for the statistic
        Returns:
        the instantiated statistic or null if an error occurred
      • forCommandLine

        public static AbstractRandomNumberGenerator forCommandLine​(String cmdline)
        Instantiates the statistic from the given commandline (i.e., classname and optional options).
        Parameters:
        cmdline - the classname (and optional options) of the statistic to instantiate
        Returns:
        the instantiated statistic or null if an error occurred