SSJ
V. labo.

umontreal.iro.lecuyer.probdist
Class NakagamiDist

java.lang.Object
  extended by umontreal.iro.lecuyer.probdist.ContinuousDistribution
      extended by umontreal.iro.lecuyer.probdist.NakagamiDist
All Implemented Interfaces:
Distribution

public class NakagamiDist
extends ContinuousDistribution

NakagamiDist

Extends the class ContinuousDistribution for the Nakagami distribution with location parameter a, scale parameter λ > 0 and shape parameter c > 0. The density is

f (x) = 2λc/Γ(c)  (x - a)2c-1  e-λ(x-a)2        for x > a,

f (x) = 0         for xa,

where Γ is the gamma function.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
decPrec
 
Constructor Summary
NakagamiDist(double a, double lambda, double c)
          .
 
Method Summary
 double barF(double x)
          Returns the complementary distribution function.
static double barF(double a, double lambda, double c, double x)
          .
 double cdf(double x)
          .
static double cdf(double a, double lambda, double c, double x)
          .
 double density(double x)
          Returns f (x), the density evaluated at x.
static double density(double a, double lambda, double c, double x)
          .
 double getA()
          .
 double getC()
          .
 double getLambda()
          .
 double getMean()
          Returns the mean.
static double getMean(double a, double lambda, double c)
          .
 double[] getParams()
          .
 double getStandardDeviation()
          Returns the standard deviation.
static double getStandardDeviation(double a, double lambda, double c)
          .
 double getVariance()
          Returns the variance.
static double getVariance(double a, double lambda, double c)
          .
 double inverseF(double u)
          Returns the inverse distribution function x = F-1(u).
static double inverseF(double a, double lambda, double c, double u)
          .
 void setParams(double a, double lambda, double c)
          .
 String toString()
          .
 
Methods inherited from class umontreal.iro.lecuyer.probdist.ContinuousDistribution
getXinf, getXsup, inverseBisection, inverseBrent, setXinf, setXsup
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NakagamiDist

public NakagamiDist(double a,
                    double lambda,
                    double c)
. \begin{tabb}Constructs a \texttt{NakagamiDist} object with parameters $a =$
 \texttt{a}, $\lambda =$\ \texttt{lambda} and $c =$\ \texttt{c}.
 \end{tabb}

Method Detail

density

public double density(double x)
Description copied from class: ContinuousDistribution
Returns f (x), the density evaluated at x.

Specified by:
density in class ContinuousDistribution
Parameters:
x - value at which the density is evaluated
Returns:
density function evaluated at x

cdf

public double cdf(double x)
Description copied from interface: Distribution
. \begin{tabb}Returns the distribution function $F(x)$.
 \end{tabb}
xvalue at which the distribution function is evaluated distribution function evaluated at x


barF

public double barF(double x)
Description copied from class: ContinuousDistribution
Returns the complementary distribution function. The default implementation computes bar(F)(x) = 1 - F(x).

Specified by:
barF in interface Distribution
Overrides:
barF in class ContinuousDistribution
Parameters:
x - value at which the complementary distribution function is evaluated
Returns:
complementary distribution function evaluated at x

inverseF

public double inverseF(double u)
Description copied from class: ContinuousDistribution
Returns the inverse distribution function x = F-1(u). Restrictions: u∈[0, 1].

Specified by:
inverseF in interface Distribution
Overrides:
inverseF in class ContinuousDistribution
Parameters:
u - value at which the inverse distribution function is evaluated
Returns:
the inverse distribution function evaluated at u

getMean

public double getMean()
Description copied from class: ContinuousDistribution
Returns the mean.

Specified by:
getMean in interface Distribution
Overrides:
getMean in class ContinuousDistribution
Returns:
the mean

getVariance

public double getVariance()
Description copied from class: ContinuousDistribution
Returns the variance.

Specified by:
getVariance in interface Distribution
Overrides:
getVariance in class ContinuousDistribution
Returns:
the variance

getStandardDeviation

public double getStandardDeviation()
Description copied from class: ContinuousDistribution
Returns the standard deviation.

Specified by:
getStandardDeviation in interface Distribution
Overrides:
getStandardDeviation in class ContinuousDistribution
Returns:
the standard deviation

density

public static double density(double a,
                             double lambda,
                             double c,
                             double x)
. \begin{tabb}Computes the density function of the {\em Nakagami\/} distribution.
 \end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter xthe value at which the density is evaluated returns the density function


cdf

public static double cdf(double a,
                         double lambda,
                         double c,
                         double x)
. \begin{tabb}Computes the distribution function.
 \end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter xthe value at which the distribution is evaluated returns the cdf function


barF

public static double barF(double a,
                          double lambda,
                          double c,
                          double x)
. \begin{tabb}Computes the complementary distribution function.
 \end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter xthe value at which the complementary distribution is evaluated returns the complementary distribution function


inverseF

public static double inverseF(double a,
                              double lambda,
                              double c,
                              double u)
. \begin{tabb}Computes the inverse of the distribution function.
 \end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter uthe value at which the inverse distribution is evaluated returns the inverse distribution function


getMean

public static double getMean(double a,
                             double lambda,
                             double c)
. \begin{tabb}Computes and returns the mean
 \begin{displaymath}
 E[X] = a + \frac{1}{\sqrt{\lambda}}\; \frac{\Gamma(c+1/2)}{\Gamma(c)}.
 \end{displaymath}\end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter returns the mean


getVariance

public static double getVariance(double a,
                                 double lambda,
                                 double c)
. \begin{tabb}Computes and returns the variance
 \begin{displaymath}
 \mbox{Var}[X]...
 ...{\lambda} [c -
 (\frac{\Gamma(c+1/2)}{\Gamma(c)})^2].
 \end{displaymath}\end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter returns the variance


getStandardDeviation

public static double getStandardDeviation(double a,
                                          double lambda,
                                          double c)
. \begin{tabb}Computes the standard deviation of the Nakagami distribution with
 parameters $a$, $\lambda$\ and $c$.
 \end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter returns the standard deviation


getA

public double getA()
. \begin{tabb}Returns the location parameter $a$\ of this object.
 \end{tabb}
returns the location parameter


getLambda

public double getLambda()
. \begin{tabb}Returns the scale parameter $\lambda$\ of this object.
 \end{tabb}
returns the scale parameter


getC

public double getC()
. \begin{tabb}Returns the shape parameter $c$\ of this object.
 \end{tabb}
returns the shape parameter


setParams

public void setParams(double a,
                      double lambda,
                      double c)
. \begin{tabb}Sets the parameters $a$, $\lambda$\ and $c$\ of this object.
 \end{tabb}
athe location parameter lambdathe scale parameter cthe shape parameter


getParams

public double[] getParams()
. \begin{tabb}
 Return a table containing the parameters of the current distribution.
 This table is put in regular order: [$a$, $\lambda$, $c$].
 \end{tabb}
returns the parameters [a, λ, c]


toString

public String toString()
. \begin{tabb}
 Returns a \texttt{String} containing information about the current distribution.
 \end{tabb}
returns a String containing information about the current distribution.

Overrides:
toString in class Object

SSJ
V. labo.

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