Click or drag to resize

RandGenTriangular(Double, Double, Double, RandomNumberGeneratorUniformRandomNumber) Constructor

Constructs a random number generator using the given delegate as the underlying uniform random number generator. The generated deviates will follow a triangular distribution with the specified lower bound, upper bound, and mode.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public RandGenTriangular(
	double lb,
	double ub,
	double m,
	RandomNumberGeneratorUniformRandomNumber rand
)

Parameters

lb  Double
The lower bound.
ub  Double
The upper bound.
m  Double
The mode.
rand  RandomNumberGeneratorUniformRandomNumber
A delegate method that returns a uniform random deviate between zero and one.
Exceptions
ExceptionCondition
InvalidArgumentException Thrown if the lower bound, upper bound, and mode are not distinct, or if the mode is not strictly between the lower and upper bounds.
See Also