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

Class PowerGen



  • public class PowerGen
    extends RandomVariateGen
    This class implements random variate generators for the power distribution with shape parameter c > 0, over the interval [a, b]. Its density is

    f (x) = c(x - a)c-1/(b - a)c

    for a <= x <= b, and 0 elsewhere.
    • Constructor Summary

      Constructors 
      Constructor and Description
      PowerGen(RandomStream s, double c)
      Creates a Power random variate generator with parameters a = 0, b = 1 and c = c, using stream s.
      PowerGen(RandomStream s, double a, double b, double c)
      Creates a Power random variate generator with parameters a = a, b = b and c = c, using stream s.
      PowerGen(RandomStream s, PowerDist dist)
      Creates a new generator for the power distribution dist and stream s.
    • Constructor Detail

      • PowerGen

        public PowerGen(RandomStream s,
                        double a,
                        double b,
                        double c)
        Creates a Power random variate generator with parameters a = a, b = b and c = c, using stream s.
      • PowerGen

        public PowerGen(RandomStream s,
                        double c)
        Creates a Power random variate generator with parameters a = 0, b = 1 and c = c, using stream s.
      • PowerGen

        public PowerGen(RandomStream s,
                        PowerDist dist)
        Creates a new generator for the power distribution dist and stream s.
    • Method Detail

      • nextDouble

        public static double nextDouble(RandomStream s,
                                        double a,
                                        double b,
                                        double c)
        Uses inversion to generate a new variate from the power distribution with parameters a = a, b = b, and c = c, using stream s.
      • getA

        public double getA()
        Returns the parameter a.
      • getB

        public double getB()
        Returns the parameter b.
      • getC

        public double getC()
        Returns the parameter c.
      • setParams

        public void setParams(double a,
                              double b,
                              double c)
        Sets the parameters a, b and c for this object.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.