Class UniformDistributionF
Represents a uniform distribution that returns random values for a given interval
[MinValue, MaxValue] (single-precision).
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Numerics.Statistics
Assembly: Mars.Numerics.dll
Syntax
public class UniformDistributionF : Distribution<float>
Remarks
Every time Next(FastRandom) is called, a new random value from the interval
[MinValue, MaxValue] is returned. All values in this interval have
the same chance to be chosen.
Constructors
| Improve this Doc View SourceUniformDistributionF()
Initializes a new instance of the UniformDistributionF class.
Declaration
public UniformDistributionF()
Remarks
Every time Next(FastRandom) is called, a new random value from the interval
[MinValue, MaxValue] is returned. All values in this interval have
the same chance to be chosen.
|
Improve this Doc
View Source
UniformDistributionF(Single, Single)
Initializes a new instance of the UniformDistributionF class.
Declaration
public UniformDistributionF(float minValue, float maxValue)
Parameters
Type | Name | Description |
---|---|---|
System.Single | minValue | The minimum value. |
System.Single | maxValue | The maximum value. |
Remarks
Every time Next(FastRandom) is called, a new random value from the interval
[MinValue, MaxValue] is returned. All values in this interval have
the same chance to be chosen.
Properties
| Improve this Doc View SourceMaxValue
Gets or sets the maximum value.
Declaration
public float MaxValue { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The maximum value. The default is 1. |
Remarks
Every time Next(FastRandom) is called, a new random value from the interval
[MinValue, MaxValue] is returned. All values in this interval have
the same chance to be chosen.
|
Improve this Doc
View Source
MinValue
Gets or sets the minimum value.
Declaration
public float MinValue { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The minimum value. The default is -1. |
Remarks
Every time Next(FastRandom) is called, a new random value from the interval
[MinValue, MaxValue] is returned. All values in this interval have
the same chance to be chosen.
Methods
| Improve this Doc View SourceNext(FastRandom)
Represents a uniform distribution that returns random values for a given interval
[MinValue, MaxValue] (single-precision).
Declaration
public override float Next(FastRandom random)
Parameters
Type | Name | Description |
---|---|---|
Mars.Common.Core.Random.FastRandom | random |
Returns
Type | Description |
---|---|
System.Single |
Overrides
Mars.Numerics.Statistics.Distribution<System.Single>.Next(Mars.Common.Core.Random.FastRandom)
Remarks
Every time Next(FastRandom) is called, a new random value from the interval
[MinValue, MaxValue] is returned. All values in this interval have
the same chance to be chosen.