Class RayleighDistribution

  • All Implemented Interfaces:
    Distribution

    public class RayleighDistribution
    extends java.lang.Object
    implements Distribution
    Rayleigh distribution, a special case of the Weibull distribution.
    Since:
    0.6.0
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) double mu
      Location parameter.
      (package private) double sigma
      Scale parameter.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double cdf​(double val)
      Return the cumulative density function at the given value.
      static double cdf​(double x, double sigma)
      CDF of Rayleigh distribution
      double getMu()
      Get the position parameter.
      double getSigma()
      Get the scale parameter.
      double logpdf​(double x)
      Return the log density of an existing value
      static double logpdf​(double x, double sigma)
      PDF of Rayleigh distribution
      double nextRandom​(java.util.Random random)
      Generate a new random value
      double pdf​(double x)
      Return the density of an existing value
      static double pdf​(double x, double sigma)
      PDF of Rayleigh distribution
      double quantile​(double val)
      Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
      static double quantile​(double val, double sigma)
      Quantile function of Rayleigh distribution
      java.lang.String toString()
      Describe the distribution
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • mu

        double mu
        Location parameter.
      • sigma

        double sigma
        Scale parameter.
    • Constructor Detail

      • RayleighDistribution

        public RayleighDistribution​(double sigma)
        Constructor.
        Parameters:
        sigma - Scale parameter
      • RayleighDistribution

        public RayleighDistribution​(double mu,
                                    double sigma)
        Constructor.
        Parameters:
        mu - Position parameter
        sigma - Scale parameter
    • Method Detail

      • getMu

        public double getMu()
        Get the position parameter.
        Returns:
        Position
      • getSigma

        public double getSigma()
        Get the scale parameter.
        Returns:
        scale
      • pdf

        public double pdf​(double x)
        Description copied from interface: Distribution
        Return the density of an existing value
        Specified by:
        pdf in interface Distribution
        Parameters:
        x - existing value
        Returns:
        distribution density
      • pdf

        public static double pdf​(double x,
                                 double sigma)
        PDF of Rayleigh distribution
        Parameters:
        x - Value
        sigma - Scale
        Returns:
        PDF at position x.
      • logpdf

        public double logpdf​(double x)
        Description copied from interface: Distribution
        Return the log density of an existing value
        Specified by:
        logpdf in interface Distribution
        Parameters:
        x - existing value
        Returns:
        log distribution density
      • logpdf

        public static double logpdf​(double x,
                                    double sigma)
        PDF of Rayleigh distribution
        Parameters:
        x - Value
        sigma - Scale
        Returns:
        PDF at position x.
      • cdf

        public double cdf​(double val)
        Description copied from interface: Distribution
        Return the cumulative density function at the given value.
        Specified by:
        cdf in interface Distribution
        Parameters:
        val - existing value
        Returns:
        cumulative density
      • cdf

        public static double cdf​(double x,
                                 double sigma)
        CDF of Rayleigh distribution
        Parameters:
        x - Value
        sigma - Scale parameter
        Returns:
        CDF at position x.
      • quantile

        public double quantile​(double val)
        Description copied from interface: Distribution
        Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
        Specified by:
        quantile in interface Distribution
        Parameters:
        val - Quantile to find
        Returns:
        Quantile position
      • quantile

        public static double quantile​(double val,
                                      double sigma)
        Quantile function of Rayleigh distribution
        Parameters:
        val - Value
        sigma - Scale parameter
        Returns:
        Quantile function at position x.
      • nextRandom

        public double nextRandom​(java.util.Random random)
        Description copied from interface: Distribution
        Generate a new random value
        Specified by:
        nextRandom in interface Distribution
        Parameters:
        random - Random number generator
        Returns:
        new random value
      • toString

        public java.lang.String toString()
        Description copied from interface: Distribution
        Describe the distribution
        Specified by:
        toString in interface Distribution
        Overrides:
        toString in class java.lang.Object
        Returns:
        description