SSJ
V. 1.1.9.

umontreal.iro.lecuyer.probdist
Class LogarithmicDist

java.lang.Object
  extended by umontreal.iro.lecuyer.probdist.DiscreteDistributionInt
      extended by umontreal.iro.lecuyer.probdist.LogarithmicDist

public class LogarithmicDist
extends DiscreteDistributionInt

Extends the class DiscreteDistributionInt for the logarithmic distribution. It has shape parameter θ, where 0 < θ < 1. Its mass function is

p(x) = - 1/log(1 - θ)θx/x        for x = 1, 2,...

Its distribution function is

F(x) = -1/log(1-θ)∑i=1xθi/i, & for x > 0.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.probdist.DiscreteDistributionInt
EPSILON
 
Constructor Summary
LogarithmicDist(double theta)
          Constructs a logarithmic distribution with parameter θ.
 
Method Summary
static double barF(double theta, int x)
          Computes the complementary distribution function bar(F)(x).
 double barF(int x)
          Returns bar(F)(x), the complementary distribution function.
static double cdf(double theta, int x)
          Computes the distribution function F(x).
 double cdf(int x)
          Returns the distribution function F evaluated at x (see).
 double getTheta()
          Returns the θ associated with this object.
 int inverseF(double u)
          Returns the inverse distribution function F-1(u), where 0 <= u <= 1.
static int inverseF(double theta, double u)
           
static double prob(double theta, int x)
          Computes the probability mass function p(x).
 double prob(int x)
          Returns p(x), the probability of x, which should be a real number in the interval [0, 1].
 void setTheta(double theta)
          Sets the θ associated with this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogarithmicDist

public LogarithmicDist(double theta)
Constructs a logarithmic distribution with parameter θ.

Method Detail

prob

public double prob(int x)
Description copied from class: DiscreteDistributionInt
Returns p(x), the probability of x, which should be a real number in the interval [0, 1].

Specified by:
prob in class DiscreteDistributionInt
Parameters:
x - value at which the mass function must be evaluated
Returns:
the mass function evaluated at x

cdf

public double cdf(int x)
Description copied from class: DiscreteDistributionInt
Returns the distribution function F evaluated at x (see).

Specified by:
cdf in class DiscreteDistributionInt
Parameters:
x - value at which the distribution function must be evaluated
Returns:
the distribution function evaluated at x

barF

public double barF(int x)
Description copied from class: DiscreteDistributionInt
Returns bar(F)(x), the complementary distribution function.

Overrides:
barF in class DiscreteDistributionInt
Parameters:
x - value at which the complementary distribution function must be evaluated
Returns:
the complementary distribution function evaluated at x

inverseF

public int inverseF(double u)
Description copied from class: DiscreteDistributionInt
Returns the inverse distribution function F-1(u), where 0 <= u <= 1. The default implementation uses binary search.

Overrides:
inverseF in class DiscreteDistributionInt
Parameters:
u - value in the interval (0, 1) for which the inverse distribution function is evaluated
Returns:
the inverse distribution function evaluated at u

prob

public static double prob(double theta,
                          int x)
Computes the probability mass function p(x).


cdf

public static double cdf(double theta,
                         int x)
Computes the distribution function F(x).


barF

public static double barF(double theta,
                          int x)
Computes the complementary distribution function bar(F)(x).


inverseF

public static int inverseF(double theta,
                           double u)

getTheta

public double getTheta()
Returns the θ associated with this object.


setTheta

public void setTheta(double theta)
Sets the θ associated with this object.


SSJ
V. 1.1.9.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.