Class DblTriangular

    • Constructor Detail

      • DblTriangular

        public DblTriangular​(double min,
                             double mode,
                             double max)
    • Method Detail

      • fromMinModeMax

        public static DblTriangular fromMinModeMax​(double min,
                                                   double mode,
                                                   double max)
        Factory method to create a DblStream given the distribution's mode value.
        Parameters:
        min - The distribution's minimum value.
        mode - The distribution's mode (most frequent) value.
        max - The distribution's maximum value.
        Returns:
        A new DblTriangular object.
      • fromMinMeanMax

        public static DblTriangular fromMinMeanMax​(double min,
                                                   double mean,
                                                   double max)
        Factory method to create a DblStream given the distribution's mean value.
        Parameters:
        min - The distribution's minimum value.
        mean - The distribution's mean value.
        max - The distribution's maximum value.
        Returns:
        A new DblTriangular object.
      • 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
      • 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.
      • getMin

        public double getMin()
      • setMin

        public void setMin​(double min)
      • getMode

        public double getMode()
      • setMode

        public void setMode​(double mode)
      • getMax

        public double getMax()
      • setMax

        public void setMax​(double max)