Click or drag to resize

RandomNumberGeneratorDiscreteUniform Method (Int32, Int32, Int32, Int32, Int32)

Draws a sample from a discrete Uniform distribution defined on the specified interval and returns it in a destination array.

Namespace:  Novacta.Analytics
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
public void DiscreteUniform(
	int sampleSize,
	int[] destinationArray,
	int destinationIndex,
	int lowerBound,
	int upperBound
)

Parameters

sampleSize
Type: SystemInt32
The sample size.
destinationArray
Type: SystemInt32
The destination array that receives the sampled data.
destinationIndex
Type: SystemInt32
The index in destinationArray at which storing begins.
lowerBound
Type: SystemInt32
The interval lower bound, inclusive.
upperBound
Type: SystemInt32
The interval upper bound, exclusive.
Exceptions
ExceptionCondition
ArgumentNullExceptiondestinationArray is null.
ArgumentOutOfRangeExceptionsampleSize is not positive.
ArgumentException Parameter sampleSize must be less than or equal to the difference between the length of parameter destinationArray and destinationIndex.
-or-
destinationIndex is negative, or upperBound is not greater than lowerBound.
See Also