DiscreteUniformDistribution Type

Provides generation of discrete uniformly distributed random numbers.

The discrete uniform distribution generates only discrete numbers.
The implementation of the DiscreteUniformDistribution type bases upon information presented on Wikipedia - Uniform distribution (discrete).

Constructors

Constructor Description

DiscreteUniformDistribution()

Full Usage: DiscreteUniformDistribution()

DiscreteUniformDistribution(gen)

Full Usage: DiscreteUniformDistribution(gen)

Parameters:

gen : Generator

DiscreteUniformDistribution(lower, upper)

Full Usage: DiscreteUniformDistribution(lower, upper)

Parameters:
    lower : int
    upper : int

Initializes a new instance of the DiscreteUniformDistribution class, using a StandardGenerator as underlying random number generator.

lower : int
upper : int

DiscreteUniformDistribution(lower, upper, generator)

Full Usage: DiscreteUniformDistribution(lower, upper, generator)

Parameters:
    lower : int - Lower boundary of the distributed values.
    upper : int - Upper boundary of the distributed values.
    generator : Generator - A Generator object.

Initializes a new instance of the DiscreteUniformDistribution class, using the specified Generator as underlying random number generator.

lower : int

Lower boundary of the distributed values.

upper : int

Upper boundary of the distributed values.

generator : Generator

A Generator object.

ArgumentNullException generator is NULL ( in Visual Basic).

Instance members

Instance member Description

this.CDF

Full Usage: this.CDF

Parameters:
    x : float

Returns: float
Modifiers: abstract

x : float
Returns: float

this.IsValidLowerBound

Full Usage: this.IsValidLowerBound

Parameters:
    value : int - The value to check.

Returns: bool if value is less than or equal to DiscreteUniformDistribution.UpperBound; otherwise, .

Determines whether the specified value is valid for parameter DiscreteUniformDistribution.LowerBound.

value : int

The value to check.

Returns: bool

if value is less than or equal to DiscreteUniformDistribution.UpperBound; otherwise, .

this.IsValidUpperBound

Full Usage: this.IsValidUpperBound

Parameters:
    value : int - The value to check.

Returns: bool if value is greater than or equal to DiscreteUniformDistribution.LowerBound, and less than Int32.MaxValue; otherwise, .

Determines whether the specified value is valid for parameter DiscreteUniformDistribution.UpperBound.

value : int

The value to check.

Returns: bool

if value is greater than or equal to DiscreteUniformDistribution.LowerBound, and less than Int32.MaxValue; otherwise, .

this.LowerBound

Full Usage: this.LowerBound

Returns: int

Gets or sets the parameter lower bound which is used for generation of uniformly distributed random numbers.

Returns: int

this.Maximum

Full Usage: this.Maximum

Returns: float
Modifiers: abstract

Gets the maximum possible value of uniformly distributed random numbers.

Returns: float

this.Mean

Full Usage: this.Mean

Returns: float
Modifiers: abstract

Gets the mean value of the uniformly distributed random numbers.

Returns: float

this.Median

Full Usage: this.Median

Returns: float
Modifiers: abstract

Gets the median of uniformly distributed random numbers.

Returns: float

this.Minimum

Full Usage: this.Minimum

Returns: float
Modifiers: abstract

Gets the minimum possible value of uniformly distributed random numbers.

Returns: float

this.Mode

Full Usage: this.Mode

Returns: float[]
Modifiers: abstract

Gets the mode of the uniformly distributed random numbers.

Returns: float[]

this.Next

Full Usage: this.Next

Returns: int A geometric distributed 32-bit signed integer.

Returns a uniformly distributed random number.

Returns: int

A geometric distributed 32-bit signed integer.

this.NextDouble

Full Usage: this.NextDouble

Returns: float A uniformly distributed double-precision floating point number.
Modifiers: abstract

Returns a uniformly distributed floating point random number.

Returns: float

A uniformly distributed double-precision floating point number.

this.PDF

Full Usage: this.PDF

Parameters:
    x : float

Returns: float
Modifiers: abstract

x : float
Returns: float

this.UpperBound

Full Usage: this.UpperBound

Returns: int

Gets or sets the upper boundary which is used for generation of uniformly distributed random numbers.

Returns: int

this.Variance

Full Usage: this.Variance

Returns: float
Modifiers: abstract

Gets the variance of uniformly distributed random numbers.

Returns: float

Static members

Static member Description

DiscreteUniformDistribution.CDF(x, low, high)

Full Usage: DiscreteUniformDistribution.CDF(x, low, high)

Parameters:
    x : float
    low : float
    high : float

Returns: float

x : float
low : float
high : float
Returns: float

DiscreteUniformDistribution.PDF(x, low, high)

Full Usage: DiscreteUniformDistribution.PDF(x, low, high)

Parameters:
    x : float
    low : float
    high : float

Returns: float

x : float
low : float
high : float
Returns: float