Class GammaRV

    • Constructor Detail

      • GammaRV

        public GammaRV​(double shape,
                       double scale)
      • GammaRV

        public GammaRV​(double shape,
                       double scale,
                       int streamNum)
      • GammaRV

        public GammaRV​(double shape,
                       double scale,
                       RNStreamIfc rng)
    • Method Detail

      • newInstance

        public GammaRV newInstance​(RNStreamIfc rng)
        Parameters:
        rng - the RNStreamIfc to use
        Returns:
        a new instance with same parameter value
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getShape

        public double getShape()
        Gets the shape
        Returns:
        The shape parameter as a double
      • getScale

        public double getScale()
        Gets the scale parameter
        Returns:
        The scale parameter as a double
      • generate

        protected double generate()
        Specified by:
        generate in class AbstractRVariable
        Returns:
        the randomly generated variate
      • makeControls

        public static RVControls makeControls()
        The keys are "shape" with default value 1.0 and "scale" with default value 1.0
        Returns:
        a control for Gamma random variables
      • randomViaAcceptanceRejection

        public double randomViaAcceptanceRejection()
        Provides a random number via the standard acceptance rejection technique see Law and Kelton for the algorithm
        Returns:
        double a random number distributed according to the receiver.