Class Erlang

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

    
    public class Erlang
    extends Markovian implements Serializable
                        

    An Erlang-n distribution with n phases.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Erlang(double phaseRate, int n) Creates an Erlang distribution with the specified phase rate and number of phases.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      static Erlang fitMeanAndOrder(double mean, long numPhases) Creates an Erlang distribution fitted to the specified mean and number of phases.
      static Erlang fitMeanAndSCV(double mean, double SCV) Creates an Erlang distribution fitted to the specified mean and squared coefficient of variation.
      static Erlang fitMeanAndStdDev(double mean, double stdDev) Creates an Erlang distribution fitted to the specified mean and standard deviation.
      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 Erlang distribution.
      double getRate() Gets the rate of this Erlang distribution.
      double getSCV() Gets the squared coefficient of variation.
      double getSkewness() Gets the skewness of this Erlang distribution.
      double getVar() Gets the variance of this Erlang distribution.
      Array<double> sample(int n, Random random) Generates random samples from this distribution using the specified random generator.
      Array<double> sample(int n) Generates random samples from this distribution using default random generator.
      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, getNumberOfPhases, getPhi, getProcess, getSubgenerator, getVariance, idc, idi, initProb, moments, mu, numPhases, numberOfPhases, 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

      • Erlang

        Erlang(double phaseRate, int n)
        Creates an Erlang distribution with the specified phase rate and number of phases.
        Parameters:
        phaseRate - the rate parameter for each phase
        n - the number of phases
    • Method Detail

      • fitMeanAndOrder

         static Erlang fitMeanAndOrder(double mean, long numPhases)

        Creates an Erlang distribution fitted to the specified mean and number of phases.

        Parameters:
        mean - the desired mean value
        numPhases - the number of phases
        Returns:

        an Erlang distribution with the specified characteristics

      • fitMeanAndSCV

         static Erlang fitMeanAndSCV(double mean, double SCV)

        Creates an Erlang distribution fitted to the specified mean and squared coefficient of variation.

        Parameters:
        mean - the desired mean value
        SCV - the desired squared coefficient of variation
        Returns:

        an Erlang distribution with the specified characteristics

      • fitMeanAndStdDev

         static Erlang fitMeanAndStdDev(double mean, double stdDev)

        Creates an Erlang distribution fitted to the specified mean and standard deviation.

        Parameters:
        mean - the desired mean value
        stdDev - the desired standard deviation
        Returns:

        an Erlang distribution with the specified characteristics

      • 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 at point 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))^r

      • getMean

         double getMean()

        Gets the mean of this Erlang distribution.

        Returns:

        the mean value (r/α)

      • getRate

         double getRate()

        Gets the rate of this Erlang distribution.

        Returns:

        the rate (α/r)

      • getSCV

         double getSCV()

        Gets the squared coefficient of variation.

        Returns:

        the SCV (1/r)

      • getSkewness

         double getSkewness()

        Gets the skewness of this Erlang distribution.

        Returns:

        the skewness (2/√r)

      • getVar

         double getVar()

        Gets the variance of this Erlang distribution.

        Returns:

        the variance (r/α²)

      • sample

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

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

        Parameters:
        n - the number of samples to generate
        random - the random number generator to use
        Returns:

        array of random samples

      • 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

      • 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()