Class ConstValueDistribution<T>
Represents a probability distribution that contains only 1 value with 100% probability. Hence
this distribution always returns a single constant value - no uncertainty.
Namespace: Mars.Numerics.Statistics
Assembly: Mars.Numerics.dll
Syntax
public class ConstValueDistribution<T> : Distribution<T>
Type Parameters
Name | Description |
---|---|
T | The type of the constant. |
Constructors
ConstValueDistribution()
Initializes a new instance of the ConstValueDistribution<T> class.
Declaration
public ConstValueDistribution()
ConstValueDistribution(T)
Initializes a new instance of the ConstValueDistribution<T> class.
Declaration
public ConstValueDistribution(T value)
Parameters
Type | Name | Description |
---|---|---|
T | value | The single constant value. |
Properties
Value
Gets or sets the single constant value.
Declaration
public T Value { get; set; }
Property Value
Type | Description |
---|---|
T | The single constant value. The default is 0. |
Methods
Next(FastRandom)
Declaration
public override T Next(FastRandom random)
Parameters
Type | Name | Description |
---|---|---|
Mars.Common.Core.Random.FastRandom | random |
Returns
Type | Description |
---|---|
T |
Overrides
Mars.Numerics.Statistics.Distribution<T>.Next(Mars.Common.Core.Random.FastRandom)