Produces values random of TResult.
- Namespace
- RandN
- Implementing Types
- Open
.Decimal - I
Portable Distribution <TResult> - Uniform
.Decimal - Uniform
.UInt32 - Bernoulli
- ClosedOpen
.Single - Uniform
.Single - Closed
.Decimal - Uniform
.UInt64 - ClosedOpen
.Double - OpenClosed
.Single - Uniform
.TimeSpan - Uniform
.Int16 - Uniform
.SByte - Uniform
.Int32 - Closed
.Double - Open
.Single - Uniform
.UInt16 - OpenClosed
.Double - ClosedOpen
.Decimal - Closed
.Single - Uniform
.Byte - Uniform
.Int64 - Open
.Double - Uniform
.Double - OpenClosed
.Decimal - Uniform
- Open
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. |