IDistribution<TResult> Interface
Produces values random of TResult.
IDistribution<TResult>
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.

Type Parameters

NameDescription
TResultThe type that is produced by this distribution.

Methods

NameReturn ValueSummary
Sample<TRng>(TRng)TResult
Samples a value from rng, blocking until a suitable value is returned.
TrySample<TRng>(TRng, TResult)bool
Attempts to sample a value from rng once, returning false if the value returned is not suitable. If is returned, the value of result is unspecified.

Extension Methods

NameValueSummary
Select<TResult, TResult>(Func<TResult, TResult>)IDistribution<TResult>
Transforms a distribution by mapping its values using the selector provided. This method implements the "map" operator from functional programming principles.
SelectMany<TResult, TIntermediate, TResult>(Func<TResult, IDistribution<TIntermediate>>, Func<TResult, TIntermediate, TResult>)IDistribution<TResult>
Transforms a distribution by mapping values using the selector provided to produce a new distribution, which is then sampled from.
SelectMany<TResult, TResult>(Func<TResult, IDistribution<TResult>>)IDistribution<TResult>
Transforms a distribution by mapping values using the selector provided to produce a new distribution, which is then sampled from. This method implements the "bind" operator from functional programming principles.