Package org.apache.commons.math4.random
Class UniformRandomGenerator
- java.lang.Object
-
- org.apache.commons.math4.random.UniformRandomGenerator
-
- All Implemented Interfaces:
NormalizedRandomGenerator
public class UniformRandomGenerator extends java.lang.Object implements NormalizedRandomGenerator
This class implements a normalized uniform random generator.It generates values from a uniform distribution with mean equal to 0 and standard deviation equal to 1. Generated values fall in the range \( [-\sqrt{3}, +\sqrt{3}] \).
- Since:
- 1.2
-
-
Constructor Summary
Constructors Constructor Description UniformRandomGenerator(UniformRandomProvider generator)Creates a new generator.
-
Method Summary
Modifier and Type Method Description doublenextNormalizedDouble()Generates a random scalar with zero mean and unit standard deviation.
-
-
-
Constructor Detail
-
UniformRandomGenerator
public UniformRandomGenerator(UniformRandomProvider generator)
Creates a new generator.- Parameters:
generator- Underlying random generator.
-
-
Method Detail
-
nextNormalizedDouble
public double nextNormalizedDouble()
Generates a random scalar with zero mean and unit standard deviation.- Specified by:
nextNormalizedDoublein interfaceNormalizedRandomGenerator- Returns:
- a random scalar in the range \( [-\sqrt{3}, +\sqrt{3}] \).
-
-