Package org.hipparchus.random
Class AbstractNonUniformGenerator
java.lang.Object
org.hipparchus.random.AbstractNonUniformGenerator
- All Implemented Interfaces:
NonUniformGenerator
- Direct Known Subclasses:
ExponentialGenerator,GammaGenerator,NakagamiGenerator
Base class for generating non-uniform random variates from an underlying uniform generator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doubleGenerate next normal variate.protected doubleGenerate next uniform variate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hipparchus.random.NonUniformGenerator
nextVariate
-
Constructor Details
-
AbstractNonUniformGenerator
Simple constructor.- Parameters:
random- underlying random generator
-
-
Method Details
-
nextUniform
protected double nextUniform()Generate next uniform variate.- Returns:
- next uniform variate between 0 and 1
-
nextNormal
protected double nextNormal()Generate next normal variate.- Returns:
- next normal variate witm mean 0 and standard deviation 1
-