Class Exp

  • All Implemented Interfaces:
    java.io.Serializable , jline.lang.Copyable

    
    public class Exp
    extends Markovian implements Serializable
                        

    An exponential distribution.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Exp(double lambda) Creates an exponential distribution with the specified rate parameter.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static Exp fitMean(double MEAN) Creates an exponential distribution fitted to the specified mean.
      static Exp fitRate(double RATE) Creates an exponential distribution fitted to the specified rate.
      double evalCDF(double t) Evaluates the cumulative distribution function at the given point.
      double evalLST(double s) Evaluates the Laplace-Stieltjes transform at the given point.
      double getMean() Gets the mean of this exponential distribution.
      long getNumberOfPhases() Gets the number of phases in this distribution.
      double getRate() Gets the rate parameter of this exponential distribution.
      double getSCV() Gets the squared coefficient of variation.
      double getSkewness() Gets the skewness of this exponential distribution.
      double getVar() Gets the variance of this exponential distribution.
      Array<double> sample(int n) Generates random samples from this distribution using default random generator.
      Array<double> sample(int n, Random rand) Generates random samples from this distribution using the specified random generator.
      String toString()
      void updateRate(double rate) Updates the rate parameter of this exponential distribution.
      long numberOfPhases() Kotlin-style property alias for getNumberOfPhases()
      long numPhases() Kotlin-style property alias for getNumberOfPhases()
      double mean() Kotlin-style property alias for getMean()
      double rate() Kotlin-style property alias for getRate()
      double scv() Kotlin-style property alias for getSCV()
      double skewness() Kotlin-style property alias for getSkewness()
      double var() Kotlin-style property alias for getVar()
      • Methods inherited from class jline.lang.processes.Markovian

        D, acf, embedded, embeddedProb, evalCDF, evalMeanT, evalVarT, getACF, getEmbedded, getEmbeddedProb, getIDC, getIDI, getInitProb, getMoments, getMu, getPhi, getProcess, getSubgenerator, getVariance, idc, idi, initProb, moments, mu, phi, process, setMean, setProcess, setRate, subgenerator, variance
      • Methods inherited from class jline.lang.processes.Distribution

        evalProbInterval, getName, getNumParams, getParam, getSupport, isContinuous, isDisabled, isDiscrete, isImmediate, isMarkovian, name, numParams, param, setNumParams, setParam, support
      • Methods inherited from class jline.lang.Copyable

        copy
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Exp

        Exp(double lambda)
        Creates an exponential distribution with the specified rate parameter.
        Parameters:
        lambda - the rate parameter (must be positive)
    • Method Detail

      • fitMean

         static Exp fitMean(double MEAN)

        Creates an exponential distribution fitted to the specified mean.

        Parameters:
        MEAN - the desired mean value
        Returns:

        an exponential distribution with the specified mean

      • fitRate

         static Exp fitRate(double RATE)

        Creates an exponential distribution fitted to the specified rate.

        Parameters:
        RATE - the desired rate value
        Returns:

        an exponential distribution with the specified rate

      • evalCDF

         double evalCDF(double t)

        Evaluates the cumulative distribution function at the given point.

        Parameters:
        t - the point at which to evaluate the CDF
        Returns:

        the CDF value F(t) = 1 - e^(-λt)

      • evalLST

         double evalLST(double s)

        Evaluates the Laplace-Stieltjes transform at the given point.

        Parameters:
        s - the transform variable
        Returns:

        the LST value λ/(λ+s)

      • getMean

         double getMean()

        Gets the mean of this exponential distribution.

        Returns:

        the mean value (1/λ)

      • getNumberOfPhases

         long getNumberOfPhases()

        Gets the number of phases in this distribution. Exponential distribution has a single phase.

        Returns:

        always returns 1

      • getRate

         double getRate()

        Gets the rate parameter of this exponential distribution.

        Returns:

        the rate parameter λ

      • getSCV

         double getSCV()

        Gets the squared coefficient of variation. For exponential distribution, SCV = 1.

        Returns:

        always returns 1

      • getSkewness

         double getSkewness()

        Gets the skewness of this exponential distribution.

        Returns:

        always returns 2

      • getVar

         double getVar()

        Gets the variance of this exponential distribution.

        Returns:

        the variance (1/λ²)

      • sample

         Array<double> sample(int n)

        Generates random samples from this distribution using default random generator.

        Parameters:
        n - the number of samples to generate
        Returns:

        array of random samples

      • sample

         Array<double> sample(int n, Random rand)

        Generates random samples from this distribution using the specified random generator.

        Parameters:
        n - the number of samples to generate
        Returns:

        array of random samples

      • updateRate

         void updateRate(double rate)

        Updates the rate parameter of this exponential distribution.

        Parameters:
        rate - the new rate parameter
      • numberOfPhases

         long numberOfPhases()

        Kotlin-style property alias for getNumberOfPhases()

      • numPhases

         long numPhases()

        Kotlin-style property alias for getNumberOfPhases()

      • mean

         double mean()

        Kotlin-style property alias for getMean()

      • rate

         double rate()

        Kotlin-style property alias for getRate()

      • scv

         double scv()

        Kotlin-style property alias for getSCV()

      • skewness

         double skewness()

        Kotlin-style property alias for getSkewness()

      • var

         double var()

        Kotlin-style property alias for getVar()