Class DblConst

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class DblConst
    extends DblSequence
    A DblConst stream infinitely returns the numbers of getValues() in exactly this order. After the last value being returned the sequence starts again with the first number. Optionally the order of items is permuted if randomizeOrder was set to true.
    Author:
    Torsten Hildebrandt
    See Also:
    Serialized Form
    • Constructor Detail

      • DblConst

        public DblConst()
      • DblConst

        public DblConst​(double... vs)
    • Method Detail

      • nextDbl

        public double nextDbl()
        Description copied from class: DblSequence
        Returns the next number in this number stream.
        Specified by:
        nextDbl 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.
      • getValues

        public double[] getValues()
      • setValues

        public void setValues​(double... vs)
        Sets the values to return as members of this number stream.
        Parameters:
        vs - The values to use.
      • isRandomizeOrder

        public boolean isRandomizeOrder()
      • setRandomizeOrder

        public void setRandomizeOrder​(boolean randomizeOrder)
        If set to true, the elements of values will be returned in a randomly permuted order. Otherwise the values will be returned in exactly the same order as given in values.
        Parameters:
        randomizeOrder - Whether or not to randomize the order.