Produces values random of TResult.
- Namespace
- RandN
- Implementing Types
- Closed
.Double - Closed
.Decimal - Uniform
.TimeSpan - Uniform
.Int16 - Uniform
.Decimal - Uniform
.Single - I
Portable Distribution <TResult> - Bernoulli
- Uniform
.UInt16 - Uniform
.SByte - Uniform
.UInt64 - ClosedOpen
.Double - Open
.Single - OpenClosed
.Single - Open
.Decimal - Open
.Double - Uniform
.Int32 - Uniform
.UInt32 - OpenClosed
.Decimal - Uniform
.Byte - Uniform
.Int64 - OpenClosed
.Double - ClosedOpen
.Single - Closed
.Single - ClosedOpen
.Decimal - Uniform
.Double
- Closed
Syntax
public interface IDistribution<TResult>
Remarks
Implementations are immutable and therefore thread safe.
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. |