Package org.apache.commons.math4.random
Class GaussianRandomGenerator
java.lang.Object
org.apache.commons.math4.random.GaussianRandomGenerator
- All Implemented Interfaces:
NormalizedRandomGenerator
public class GaussianRandomGenerator extends java.lang.Object implements NormalizedRandomGenerator
Random generator that generates normally distributed samples.
- Since:
- 1.2
-
Constructor Summary
Constructors Constructor Description GaussianRandomGenerator(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 Details
-
GaussianRandomGenerator
Creates a new generator.- Parameters:
generator- Underlying random generator.
-
-
Method Details
-
nextNormalizedDouble
public double nextNormalizedDouble()Generates a random scalar with zero mean and unit standard deviation.- Specified by:
nextNormalizedDoublein interfaceNormalizedRandomGenerator- Returns:
- a random value sampled from a normal distribution.
-