Class TriangularDistribution
Provides generation of triangular distributed random numbers.
Inherited Members
Namespace: Experior.Core.Mathematics.Statistics.Generators.Continuous
Assembly: Experior.Core.dll
Syntax
public class TriangularDistribution : Distribution
Remarks
The implementation of the TriangularDistribution type bases upon information presented on Wikipedia - Triangular distribution and the implementation in the Boost Random Number Library.
Constructors
TriangularDistribution()
Initializes a new instance of the TriangularDistribution class, using a StandardGenerator as underlying random number generator.
Declaration
public TriangularDistribution()
TriangularDistribution(Generator)
Initializes a new instance of the TriangularDistribution class, using the specified Generator as underlying random number generator.
Declaration
public TriangularDistribution(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 triangular distributed random numbers.
Declaration
public double Alpha { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The alpha. |
Remarks
Call IsValidAlpha(Double) to determine whether a value is valid and therefor assignable.
Beta
Gets or sets the parameter beta which is used for generation of triangular distributed random numbers.
Declaration
public double Beta { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The beta. |
Remarks
Call IsValidBeta(Double) to determine whether a value is valid and therefor assignable.
Gamma
Gets or sets the parameter gamma which is used for generation of triangular distributed random numbers.
Declaration
public double Gamma { get; set; }
Property Value
Type | Description |
---|---|
System.Double | The gamma. |
Remarks
Call IsValidGamma(Double) to determine whether a value is valid and therefor assignable.
Maximum
Gets the maximum possible value of triangular distributed random numbers.
Declaration
public override double Maximum { get; }
Property Value
Type | Description |
---|---|
System.Double | The maximum. |
Overrides
Mean
Gets the mean value of triangular distributed random numbers.
Declaration
public override double Mean { get; }
Property Value
Type | Description |
---|---|
System.Double | The mean. |
Overrides
Median
Gets the median of triangular 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 triangular distributed random numbers.
Declaration
public override double Minimum { get; }
Property Value
Type | Description |
---|---|
System.Double | The minimum. |
Overrides
Mode
Gets the mode of triangular distributed random numbers.
Declaration
public override double[] Mode { get; }
Property Value
Type | Description |
---|---|
System.Double[] | The mode. |
Overrides
Variance
Gets the variance of triangular distributed random numbers.
Declaration
public override double Variance { get; }
Property Value
Type | Description |
---|---|
System.Double | The variance. |
Overrides
Methods
IsValidAlpha(Double)
Determines whether the specified value is valid for parameter Alpha.
Declaration
public bool IsValidAlpha(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if value is less than Beta, and less than or equal to Gamma; otherwise, false. |
IsValidBeta(Double)
Determines whether the specified value is valid for parameter Beta.
Declaration
public bool IsValidBeta(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if value is greater than Alpha, and greater than or equal to Gamma; otherwise, false. |
IsValidGamma(Double)
Determines whether the specified value is valid for parameter Gamma.
Declaration
public bool IsValidGamma(double value)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The value to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if value is greater than or equal to Alpha, and greater than or equal to Beta; otherwise, false. |
NextDouble()
Returns a triangular distributed floating point random number.
Declaration
public override double NextDouble()
Returns
Type | Description |
---|---|
System.Double | A triangular distributed double-precision floating point number. |