Documentation of 'umontreal.iro.lecuyer.randvar.BernoulliGen' Java class
BernoulliGen
umontreal.iro.lecuyer.randvar

Class BernoulliGen



  • public class BernoulliGen
    extends RandomVariateGenInt
    This class implements random variate generators for the Bernoulli distribution (see class BernoulliDist).
    • Constructor Detail

      • BernoulliGen

        public BernoulliGen(RandomStream s,
                            double p)
        Creates a Bernoulli random variate generator with parameter p, using stream s.
      • BernoulliGen

        public BernoulliGen(RandomStream s,
                            BernoulliDist dist)
        Creates a random variate generator for the Bernoulli distribution dist and the random stream s.
    • Method Detail

      • nextInt

        public static int nextInt(RandomStream s,
                                  double p)
        Generates a new integer from the Bernoulli distribution with parameter p = p, using the given stream s.
      • getP

        public double getP()
        Returns the parameter p of this object.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.