Class Distribution

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

    
    public abstract class Distribution
     implements Copyable
                        

    An abstract class of a general distribution

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
      Distribution(String name, int numParam, Pair<Double, Double> support) Creates a new distribution with the specified characteristics.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract double evalCDF(double t) Evaluates the cumulative distribution function (CDF) at the given point.
      double evalProbInterval(double t0, double t1) Evaluates the probability of the distribution falling within the given interval.
      abstract double getMean() Gets the mean (expected value) of this distribution.
      String getName() Gets the name of this distribution type.
      int getNumParams(int id) Gets the number of parameters for this distribution.
      NamedParam getParam(int id) Gets a parameter by its ID.
      double getRate() Gets the rate of this distribution (inverse of mean).
      abstract double getSCV() Gets the squared coefficient of variation (SCV) of this distribution.
      abstract double getSkewness() Gets the skewness of this distribution.
      Pair<Double, Double> getSupport() Gets the support range of this distribution.
      double getVar() Gets the variance of this distribution.
      boolean isContinuous() Checks if this is a continuous distribution.
      boolean isDisabled() Checks if this is a disabled distribution.
      boolean isDiscrete() Checks if this is a discrete distribution.
      boolean isImmediate() Checks if this distribution has immediate (zero) service time.
      Array<double> sample(int n) Generates random samples from this distribution using default random generator.
      abstract Array<double> sample(int n, Random random) Generates random samples from this distribution using the specified random generator.
      void setNumParams(int num) Sets the number of parameters for this distribution.
      void setParam(int id, String name, Object value) Sets a parameter value for this distribution.
      abstract double evalLST(double s) Evaluate the Laplace-Stieltjes Transform at s
      boolean isMarkovian() Check if this distribution is Markovian (has a matrix process representation)
      String name() Kotlin-style property alias for getName()
      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()
      Pair<Double, Double> support() Kotlin-style property alias for getSupport()
      int numParams(int id) Kotlin-style property alias for getNumParams(int id)
      NamedParam param(int id) Kotlin-style property alias for getParam(int id)
      • 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

      • Distribution

        Distribution(String name, int numParam, Pair<Double, Double> support)
        Creates a new distribution with the specified characteristics.
        Parameters:
        name - the name of this distribution type
        numParam - the number of parameters required
        support - the support range [min, max] for this distribution
    • Method Detail

      • evalCDF

         abstract double evalCDF(double t)

        Evaluates the cumulative distribution function (CDF) at the given point.

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

        the CDF value at point t

      • evalProbInterval

         double evalProbInterval(double t0, double t1)

        Evaluates the probability of the distribution falling within the given interval. Computes P(t0 <= X <= t1) = F(t1) - F(t0).

        Parameters:
        t0 - the lower bound of the interval
        t1 - the upper bound of the interval
        Returns:

        the probability of falling within [t0, t1]

      • getMean

         abstract double getMean()

        Gets the mean (expected value) of this distribution.

        Returns:

        the mean value

      • getName

         String getName()

        Gets the name of this distribution type.

        Returns:

        the distribution name

      • getNumParams

         int getNumParams(int id)

        Gets the number of parameters for this distribution.

        Parameters:
        id - parameter identifier (currently unused)
        Returns:

        the number of parameters

      • getParam

         NamedParam getParam(int id)

        Gets a parameter by its ID.

        Parameters:
        id - the parameter ID (1-based index)
        Returns:

        the named parameter at the specified position

      • getRate

         double getRate()

        Gets the rate of this distribution (inverse of mean).

        Returns:

        the rate value (1/mean)

      • getSCV

         abstract double getSCV()

        Gets the squared coefficient of variation (SCV) of this distribution. SCV = Var(X) / E[X]^2.

        Returns:

        the squared coefficient of variation

      • getSkewness

         abstract double getSkewness()

        Gets the skewness of this distribution. Skewness measures the asymmetry of the probability distribution.

        Returns:

        the skewness value

      • getSupport

         Pair<Double, Double> getSupport()

        Gets the support range of this distribution.

        Returns:

        a pair containing [min, max] values where the distribution is defined

      • getVar

         double getVar()

        Gets the variance of this distribution. Computed as SCV * mean^2.

        Returns:

        the variance

      • isContinuous

         boolean isContinuous()

        Checks if this is a continuous distribution.

        Returns:

        true if this is a continuous distribution, false otherwise

      • isDisabled

         boolean isDisabled()

        Checks if this is a disabled distribution.

        Returns:

        true if this is a disabled distribution, false otherwise

      • isDiscrete

         boolean isDiscrete()

        Checks if this is a discrete distribution.

        Returns:

        true if this is a discrete distribution, false otherwise

      • isImmediate

         boolean isImmediate()

        Checks if this distribution has immediate (zero) service time.

        Returns:

        true if the distribution is immediate or has mean <Zero threshold

      • 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

         abstract 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

      • setNumParams

         void setNumParams(int num)

        Sets the number of parameters for this distribution.

        Parameters:
        num - the number of parameters
      • setParam

         void setParam(int id, String name, Object value)

        Sets a parameter value for this distribution.

        Parameters:
        id - the parameter ID (1-based index)
        name - the parameter name
        value - the parameter value
      • evalLST

         abstract double evalLST(double s)

        Evaluate the Laplace-Stieltjes Transform at s

        Parameters:
        s - the Laplace domain variable
        Returns:

        the LST value at s

      • isMarkovian

         boolean isMarkovian()

        Check if this distribution is Markovian (has a matrix process representation)

        Returns:

        true if this is a Markovian distribution, false otherwise

      • name

         String name()

        Kotlin-style property alias for getName()

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

      • numParams

         int numParams(int id)

        Kotlin-style property alias for getNumParams(int id)

      • param

         NamedParam param(int id)

        Kotlin-style property alias for getParam(int id)