Class GeometricRV

    • Constructor Detail

      • GeometricRV

        public GeometricRV​(double prob)
        Parameters:
        prob - probability of success, must be in range (0,1)
      • GeometricRV

        public GeometricRV​(double prob,
                           int streamNum)
        Parameters:
        prob - probability of success, must be in range (0,1)
        streamNum - the stream number to use
      • GeometricRV

        public GeometricRV​(double prob,
                           RNStreamIfc stream)
        Parameters:
        prob - probability of success, must be in range (0,1)
        stream - the random number stream to use
    • Method Detail

      • newInstance

        public GeometricRV newInstance​(RNStreamIfc stream)
        Parameters:
        stream - the random number stream to use
        Returns:
        a new instance with same parameter value
      • toString

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

        public double getProbabilityOfSuccess()
        Gets the success probability
        Returns:
        The success probability
      • generate

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

        public static RVControls makeControls()
        The key is "ProbOfSuccess", the default value is 0.5
        Returns:
        a control for Geometric random variables