Package oms3.ngmf.ui.calc
Class RandomExponential
- java.lang.Object
-
- oms3.ngmf.ui.calc.RandomExponential
-
public class RandomExponential extends Object
Utility class that generates exponentially-distributed random values using several algorithms.
-
-
Constructor Summary
Constructors Constructor Description RandomExponential()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatnextLog()Compute the next randomn value using the logarithm algorithm.floatnextVonNeumann()Compute the next randomn value using the von Neumann algorithm.voidsetParameters(float mean)Set the mean.
-
-
-
Method Detail
-
setParameters
public void setParameters(float mean)
Set the mean.- Parameters:
mean- the mean
-
nextLog
public float nextLog()
Compute the next randomn value using the logarithm algorithm. Requires a uniformly-distributed random value in [0, 1).
-
nextVonNeumann
public float nextVonNeumann()
Compute the next randomn value using the von Neumann algorithm. Requires sequences of uniformly-distributed random values in [0, 1).
-
-