Types in MathNet.Numerics.Distributions

Type ContinuousUniform

Namespace MathNet.Numerics.Distributions

Interfaces IContinuousDistribution

Continuous Univariate Uniform distribution. The continuous uniform distribution is a distribution over real numbers. For details about this distribution, see.

Public Constructors

ContinuousUniform(double lower, double upper, Random randomSource)

Initializes a new instance of the ContinuousUniform class with given lower and upper bounds.
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

`Random` randomSource

The random number generator which is used to draw random samples.

ContinuousUniform()

Initializes a new instance of the ContinuousUniform class with lower bound 0 and upper bound 1.

ContinuousUniform(double lower, double upper)

Initializes a new instance of the ContinuousUniform class with given lower and upper bounds.
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

Public Static Functions

doubleCDF(double lower, double upper, double x)

Computes the cumulative distribution (CDF) of the distribution at x, i.e. P(X ≤ x).
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

`double` x

The location at which to compute the cumulative distribution function.

Return
`double`

the cumulative distribution at location x.

doubleInvCDF(double lower, double upper, double p)

Computes the inverse of the cumulative distribution function (InvCDF) for the distribution at the given probability. This is also known as the quantile or percent point function.
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

`double` p

The location at which to compute the inverse cumulative density.

Return
`double`

the inverse cumulative density at p.

boolIsValidParameterSet(double lower, double upper)

Tests whether the provided values are valid parameters for this distribution.
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

doublePDF(double lower, double upper, double x)

Computes the probability density of the distribution (PDF) at x, i.e. ∂P(X ≤ x)/∂x.
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

`double` x

The location at which to compute the density.

Return
`double`

the density at x.

doublePDFLn(double lower, double upper, double x)

Computes the log probability density of the distribution (lnPDF) at x, i.e. ln(∂P(X ≤ x)/∂x).
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

`double` x

The location at which to compute the density.

Return
`double`

the log density at x.

doubleSample(Random rnd, double lower, double upper)

Generates a sample from the `ContinuousUniform` distribution.
Parameters
`Random` rnd

The random number generator to use.

`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

Return
`double`

a uniformly distributed sample.

doubleSample(double lower, double upper)

Generates a sample from the `ContinuousUniform` distribution.
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

Return
`double`

a uniformly distributed sample.

IEnumerable<double>Samples(Random rnd, double lower, double upper)

Generates a sequence of samples from the `ContinuousUniform` distribution.
Parameters
`Random` rnd

The random number generator to use.

`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

Return
`IEnumerable<double>`

a sequence of uniformly distributed samples.

voidSamples(Random rnd, Double[] values, double lower, double upper)

Fills an array with samples generated from the distribution.
Parameters
`Random` rnd

The random number generator to use.

`Double[]` values

The array to fill with the samples.

`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

Return
`void`

a sequence of samples from the distribution.

IEnumerable<double>Samples(double lower, double upper)

Generates a sequence of samples from the `ContinuousUniform` distribution.
Parameters
`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

Return
`IEnumerable<double>`

a sequence of uniformly distributed samples.

voidSamples(Double[] values, double lower, double upper)

Fills an array with samples generated from the distribution.
Parameters
`Double[]` values

The array to fill with the samples.

`double` lower

Lower bound. Range: lower ≤ upper.

`double` upper

Upper bound. Range: lower ≤ upper.

Return
`void`

a sequence of samples from the distribution.

Public Methods

doubleCumulativeDistribution(double x)

Computes the cumulative distribution (CDF) of the distribution at x, i.e. P(X ≤ x).
Parameters
`double` x

The location at which to compute the cumulative distribution function.

Return
`double`

the cumulative distribution at location x.

doubleDensity(double x)

Computes the probability density of the distribution (PDF) at x, i.e. ∂P(X ≤ x)/∂x.
Parameters
`double` x

The location at which to compute the density.

Return
`double`

the density at x.

doubleDensityLn(double x)

Computes the log probability density of the distribution (lnPDF) at x, i.e. ln(∂P(X ≤ x)/∂x).
Parameters
`double` x

The location at which to compute the log density.

Return
`double`

the log density at x.

doubleInverseCumulativeDistribution(double p)

Computes the inverse of the cumulative distribution function (InvCDF) for the distribution at the given probability. This is also known as the quantile or percent point function.
Parameters
`double` p

The location at which to compute the inverse cumulative density.

Return
`double`

the inverse cumulative density at p.

doubleSample()

Generates a sample from the `ContinuousUniform` distribution.
Return
`double`

a sample from the distribution.

IEnumerable<double>Samples()

Generates a sequence of samples from the `ContinuousUniform` distribution.
Return
`IEnumerable<double>`

a sequence of samples from the distribution.

voidSamples(Double[] values)

Fills an array with samples generated from the distribution.

stringToString()

A string representation of the distribution.
Return
`string`

a string representation of the distribution.

Public Properties

doubleEntropy get;

Gets the entropy of the distribution.

doubleLowerBound get;

Gets the lower bound of the distribution.

doubleMaximum get;

Gets the maximum of the distribution.

doubleMean get;

Gets the mean of the distribution.

doubleMedian get;

Gets the median of the distribution.

doubleMinimum get;

Gets the minimum of the distribution.

doubleMode get;

Gets the mode of the distribution.

RandomRandomSource get; set;

Gets or sets the random number generator which is used to draw random samples.

doubleSkewness get;

Gets the skewness of the distribution.

doubleStdDev get;

Gets the standard deviation of the distribution.

doubleUpperBound get;

Gets the upper bound of the distribution.

doubleVariance get;

Gets the variance of the distribution.