TruncatedDistribution

class TruncatedDistribution(theDistribution: DistributionIfc, theCDFLowerLimit: Double, theCDFUpperLimit: Double, theLowerLimit: Double, theUpperLimit: Double, name: String? = null) : Distribution, GetRVariableIfc(source)

Constructs a truncated distribution based on the provided distribution

Parameters

theDistribution

the distribution to truncate, must not be null

theCDFLowerLimit

The lower limit of the range of support of the distribution

theCDFUpperLimit

The upper limit of the range of support of the distribution

theLowerLimit

The truncated lower limit (if moved in from cdfLL), must be >= cdfLL

theUpperLimit

The truncated upper limit (if moved in from cdfUL), must be <= cdfUL

name

an optional name/label

Constructors

Link copied to clipboard
constructor(theDistribution: DistributionIfc, distDomain: Interval, truncInterval: Interval, name: String? = null)
constructor(theDistribution: DistributionIfc, theCDFLowerLimit: Double, theCDFUpperLimit: Double, theLowerLimit: Double, theUpperLimit: Double, name: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun cdf(x: Double): Double

Returns the F(x) = Pr{X <= x} where F represents the cumulative distribution function

Link copied to clipboard
open override fun instance(): TruncatedDistribution
Link copied to clipboard
open override fun invCDF(p: Double): Double

Provides the inverse cumulative distribution function for the distribution

Link copied to clipboard
open override fun mean(): Double

Returns the mean or expected value of a distribution

Link copied to clipboard
open override fun parameters(): DoubleArray

Get the parameters for the truncated distribution

open override fun parameters(params: DoubleArray)

Sets the parameters of the truncated distribution cdfLL = parameter0 cdfUL = parameters1 truncLL = parameters2 truncUL = parameters3

Link copied to clipboard
open override fun randomVariable(streamNumber: Int, streamProvider: RNStreamProviderIfc): TruncatedRV

Promises to return a random variable that uses the supplied stream number using the supplied stream provider

Link copied to clipboard
fun setDistribution(distribution: DistributionIfc, cdfLL: Double, cdfUL: Double, truncLL: Double, truncUL: Double)
Link copied to clipboard
fun setLimits(cdfLL: Double, cdfUL: Double, truncLL: Double, truncUL: Double)
Link copied to clipboard
open override fun variance(): Double

Returns the variance of the distribution if defined