Produces values random of TResult.
- Namespace
- RandN
- Implementing Types
- UniformSingle
- UnitInterval
.OpenClosedDecimal - UniformInt16
- UnitInterval
.OpenClosedSingle - UnitInterval
.OpenClosedDouble - Bernoulli
- UnitInterval
.ClosedDouble - UnitInterval
.ClosedOpenSingle - UnitInterval
.OpenDouble - UniformSByte
- UniformUInt32
- UniformInt32
- UnitInterval
.ClosedSingle - UnitInterval
.OpenSingle - UniformInt64
- UniformUInt64
- UniformUInt16
- UnitInterval
.ClosedOpenDouble - UnitInterval
.ClosedDecimal - UnitInterval
.ClosedOpenDecimal - UniformByte
- UniformTimeSpan
- UnitInterval
.OpenDecimal - UniformDecimal
- UniformDouble
Syntax
public interface IDistribution<TResult>
Remarks
Implementations are immutable and therefore thread safe. Results are also reproducible within the same assembly version.
Type Parameters
Name | Description |
---|---|
TResult | The type that is produced by this distribution. |
Methods
Name | Return Value | Summary |
---|---|---|
Sample | TResult | Samples a value from rng, blocking until a suitable value is returned. |
TrySample | bool | Attempts to sample a value from rng once, returning false if the value returned is not suitable. |