Class DistLogNormalTrunc

All Implemented Interfaces:
Serializable

public class DistLogNormalTrunc extends DistLogNormal
The Truncated Lognormal distribution.

(c) copyright 2020-2021 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Author:
Alexander Verbraeck
See Also:
  • Constructor Details

    • DistLogNormalTrunc

      public DistLogNormalTrunc(StreamInterface stream, double min, double max)
      Construct a truncated lognormal distribution with mu=0, sigma=1 with given min and max.
      Parameters:
      stream - StreamInterface; the random number stream
      min - double; minimum x-value of the distribution
      max - double; maximum x-value of the distribution
    • DistLogNormalTrunc

      public DistLogNormalTrunc(StreamInterface stream, double mu, double sigma, double min, double max)
      constructs a truncated lognormal distribution with mu and sigma and given min and max.
      Parameters:
      stream - StreamInterface; the random number stream
      mu - double; the mean
      sigma - double; the standard deviation
      min - double; minimum x-value of the distribution
      max - double; maximum x-value of the distribution
  • Method Details

    • draw

      public double draw()
      draws the next stream value according to the probability of this this distribution.
      Overrides:
      draw in class DistLogNormal
      Returns:
      the next double value drawn.
    • getCumulativeProbability

      public double getCumulativeProbability(double x)
      returns the cumulative probability of the x-value.
      Overrides:
      getCumulativeProbability in class DistLogNormal
      Parameters:
      x - double; the observation x
      Returns:
      double the cumulative probability
    • getProbabilityDensity

      public double getProbabilityDensity(double x)
      returns the probability density value of a value x.
      Overrides:
      getProbabilityDensity in class DistLogNormal
      Parameters:
      x - double; the value for which the density function needs to be calculated
      Returns:
      double; the probability density for value x
    • getInverseCumulativeProbability

      public double getInverseCumulativeProbability(double cumulativeProbability)
      returns the x-value of the given cumulativePropability.
      Overrides:
      getInverseCumulativeProbability in class DistLogNormal
      Parameters:
      cumulativeProbability - double; reflects cum prob
      Returns:
      double the inverse cumulative probability
    • getMin

      public double getMin()
      Returns:
      min
    • getMax

      public double getMax()
      Returns:
      max
    • toString

      public String toString()
      Overrides:
      toString in class DistLogNormal