| 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.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public RandGenTriangular(
double lb,
double ub,
double m,
RandomNumberGeneratorUniformRandomNumber rand
)
Public Sub New (
lb As Double,
ub As Double,
m As Double,
rand As RandomNumberGeneratorUniformRandomNumber
)
public:
RandGenTriangular(
double lb,
double ub,
double m,
RandomNumberGeneratorUniformRandomNumber^ rand
)
new :
lb : float *
ub : float *
m : float *
rand : RandomNumberGeneratorUniformRandomNumber -> RandGenTriangular
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 Exception | Condition |
---|
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