Class IntUniformRange

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class IntUniformRange
    extends IntSequence
    Generates uniformly distributed integers in the interval [min,max] (including both min and max).
    Author:
    Torsten Hildebrandt
    See Also:
    Serialized Form
    • Constructor Detail

      • IntUniformRange

        public IntUniformRange​(int min,
                               int max)
      • IntUniformRange

        public IntUniformRange​(Random random,
                               int min,
                               int max)
      • IntUniformRange

        public IntUniformRange​(String name,
                               int min,
                               int max)
      • IntUniformRange

        public IntUniformRange​(Random random,
                               String name,
                               int min,
                               int max)
    • Method Detail

      • init

        public void init()
        Description copied from class: DblSequence
        Initializes this stream. This method is supposed to be called once before repeated calls to DblSequence.nextDbl() can be made.
        Overrides:
        init in class DblSequence
      • getValueRange

        public Pair<Double,​Double> getValueRange()
        Description copied from class: DblSequence
        This method computes the minimum and maximum support values (range of possible values) of this stream.
        Overrides:
        getValueRange in class DblSequence
        Returns:
        A Pair containing the minimum and maximum support values.
      • setRange

        public void setRange​(int min,
                             int max)
      • getMin

        public int getMin()
      • setMin

        public void setMin​(int min)
        Sets the minimum value returned by this number stream.
        Parameters:
        min - The minimum to use.
      • getMax

        public int getMax()
      • setMax

        public void setMax​(int max)
        Sets the maximum value returned by this number stream.
        Parameters:
        max - The maximum to use.