DiscreteDistribution<T>.GetRandomSequence Method

Definition

Namespace: Extreme.Statistics.Distributions
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

GetRandomSequence() Returns a sequence of random samples from the distribution.
GetRandomSequence(Random) Returns a sequence of random samples from the distribution.
GetRandomSequence(Random, Int32) Returns a sequence of random samples of the specified length from the distribution.

GetRandomSequence

Returns a sequence of random samples from the distribution.
C#
public IEnumerable<T> GetRandomSequence()

Return Value

IEnumerable<T>
An IEnumerable<T>.

Remarks

This method uses the default random number generator specified by DefaultRandomNumberGenerator to generate an enumerable sequence of random samples from the distribution.

GetRandomSequence(Random)

Returns a sequence of random samples from the distribution.
C#
public IEnumerable<T> GetRandomSequence(
	Random random
)

Parameters

random  Random
A Random object that specifies the uniform random number generator that is to be used to generate the samples.

Return Value

IEnumerable<T>
An IEnumerable<T>.

Remarks

This method uses the random number generator specified by random to generate an enumerable sequence of random samples from the distribution.

Exceptions

ArgumentNullExceptionrandom is null.

GetRandomSequence(Random, Int32)

Returns a sequence of random samples of the specified length from the distribution.
C#
public IEnumerable<T> GetRandomSequence(
	Random random,
	int length
)

Parameters

random  Random
A Random object that specifies the uniform random number generator that is to be used to generate the samples.
length  Int32
The length of the sequence.

Return Value

IEnumerable<T>
An IEnumerable<Double>.

Remarks

This method uses random to generate an enumerable sequence of random samples from the distribution.

If length is less than zero then an empty sequence is returned.

Exceptions

ArgumentNullExceptionrandom is null.

See Also