Class DiscreteUniformDistribution
Provides generation of discrete uniformly distributed random numbers.
Inherited Members
Namespace: Experior.Core.Mathematics.Statistics.Generators.Discrete
Assembly: Experior.Core.dll
Syntax
public class DiscreteUniformDistribution : Distribution
Remarks
The discrete uniform distribution generates only discrete numbers.
The implementation of the DiscreteUniformDistribution type bases upon information presented on
Wikipedia - Uniform distribution (discrete).
Constructors
DiscreteUniformDistribution()
Initializes a new instance of the DiscreteUniformDistribution class, using a StandardGenerator as underlying random number generator.
Declaration
public DiscreteUniformDistribution()
DiscreteUniformDistribution(Generator)
Initializes a new instance of the DiscreteUniformDistribution class, using the specified Generator as underlying random number generator.
Declaration
public DiscreteUniformDistribution(Generator generator)
Parameters
Type | Name | Description |
---|---|---|
Generator | generator | A Generator object. |
Properties
Alpha
Gets or sets the parameter alpha which is used for generation of uniformly distributed random numbers.
Declaration
public int Alpha { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The alpha. |
Remarks
Call IsValidAlpha(Int32) to determine whether a value is valid and therefor assignable.
Beta
Gets or sets the parameter beta which is used for generation of uniformly distributed random numbers.
Declaration
public int Beta { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The beta. |
Remarks
Call IsValidBeta(Int32) to determine whether a value is valid and therefor assignable.
Maximum
Gets the maximum possible value of uniformly distributed random numbers.
Declaration
public override double Maximum { get; }
Property Value
Type | Description |
---|---|
System.Double | The maximum. |
Overrides
Mean
Gets the mean value of the uniformly distributed random numbers.
Declaration
public override double Mean { get; }
Property Value
Type | Description |
---|---|
System.Double | The mean. |
Overrides
Median
Gets the median of uniformly distributed random numbers.
Declaration
public override double Median { get; }
Property Value
Type | Description |
---|---|
System.Double | The median. |
Overrides
Minimum
Gets the minimum possible value of uniformly distributed random numbers.
Declaration
public override double Minimum { get; }
Property Value
Type | Description |
---|---|
System.Double | The minimum. |
Overrides
Mode
Gets the mode of the uniformly distributed random numbers.
Declaration
public override double[] Mode { get; }
Property Value
Type | Description |
---|---|
System.Double[] | The mode. |
Overrides
Variance
Gets the variance of uniformly distributed random numbers.
Declaration
public override double Variance { get; }
Property Value
Type | Description |
---|---|
System.Double | The variance. |
Overrides
Methods
IsValidAlpha(Int32)
Determines whether the specified value is valid for parameter Alpha.
Declaration
public bool IsValidAlpha(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The value to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if value is less than or equal to Beta; otherwise, false. |
IsValidBeta(Int32)
Determines whether the specified value is valid for parameter Beta.
Declaration
public bool IsValidBeta(int value)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | value | The value to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if value is greater than or equal to Alpha, and less than System.Int32.MaxValue; otherwise, false. |
Next()
Returns a uniformly distributed random number.
Declaration
public int Next()
Returns
Type | Description |
---|---|
System.Int32 | A geometric distributed 32-bit signed integer. |
NextDouble()
Returns a uniformly distributed floating point random number.
Declaration
public override double NextDouble()
Returns
Type | Description |
---|---|
System.Double | A uniformly distributed double-precision floating point number. |