Uniform.Int16 Struct
A uniform distribution of type System.Int16.
Namespace
RandN.Distributions
Containing Type
Uniform
Interfaces
Base Types
  • object
  • ValueType

Uniform.Int16

ValueType

object

IPortableDistribution<short>

IDistribution<short>

Syntax

public readonly struct Uniform.Int16 : ValueType, IPortableDistribution<short>, IDistribution<short>

Methods

NameReturn ValueSummary
Create(short, short)Uniform.Int16
Creates a Uniform.Int16 with an exclusive upper bound. Should not be used directly; instead, use New(short, short).
static
CreateInclusive(short, short)Uniform.Int16
Creates a Uniform.Int16 with an exclusive lower bound. Should not be used directly; instead, use NewInclusive(short, short).
static
Sample<TRng>(TRng)short
Samples a value from rng, blocking until a suitable value is returned.
TrySample<TRng>(TRng, short)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<short, TResult>(Func<short, 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<short, TIntermediate, TResult>(Func<short, IDistribution<TIntermediate>>, Func<short, 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<short, TResult>(Func<short, 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.