Produces values random of TResult.
- Namespace
- RandN
- Implementing Types
- UnitInterval
.ClosedOpenSingle - UnitInterval
.OpenClosedDouble - Bernoulli
- UniformSByte
- UnitInterval
.ClosedSingle - UnitInterval
.OpenClosedDecimal - UnitInterval
.OpenClosedSingle - UniformInt32
- UniformDecimal
- UniformSingle
- UnitInterval
.ClosedOpenDecimal - UniformDouble
- UnitInterval
.ClosedOpenDouble - UniformInt64
- UnitInterval
.ClosedDouble - UniformUInt64
- UniformInt16
- UnitInterval
.OpenDouble - UniformUInt16
- UniformByte
- UniformTimeSpan
- UnitInterval
.ClosedDecimal - UnitInterval
.OpenSingle - UnitInterval
.OpenDecimal - UniformUInt32
- UnitInterval
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. |