Class RealUniform
A 1D real uniform distribution \(\mathcal{U}(a, b)\).
The PDF of the uniform distribution \(\mathcal{U}(a, b)\) over the half open interval \( \left[a, b\right) \) where \( a < b \) is given by: \[ f(x) = \begin{cases} \frac{1}{b - a} & \text{for } x \in [a, b), \\ 0 & \text{otherwise}. \end{cases} \]
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal double
Upper bound, \( b \), of the uniform distribution (exclusive).final double
Lower bound, \( a \), of the uniform distribution (inclusive).Fields inherited from class org.flag4j.rng.distributions.Distribution
rng
-
Constructor Summary
ConstructorsConstructorDescriptionRealUniform
(Random rng, double min, double max) Constructs a real uniform distribution. -
Method Summary
-
Field Details
-
min
public final double minLower bound, \( a \), of the uniform distribution (inclusive). -
max
public final double maxUpper bound, \( b \), of the uniform distribution (exclusive).
-
-
Constructor Details
-
RealUniform
Constructs a real uniform distribution.- Parameters:
rng
- Pseudorandom number generator to use when randomly sampling from this distribution.min
- Lower bound of the uniform distribution (inclusive).max
- Upper bound of the uniform distribution (exclusive).
-
-
Method Details
-
sample
-