cern.jet.random.tdouble
Class Zeta
- java.lang.Object
-
- All Implemented Interfaces:
- DoubleFunction, IntFunction, java.io.Serializable, java.lang.Cloneable
public class Zeta extends AbstractDiscreteDistribution
Zeta distribution.Valid parameter ranges: ro > 0 and pk >= 0.
- If either ro > 100 or k > 10000 numerical problems in computing the theoretical moments arise, therefore ro <= 100 and k <= 10000 are recommended.
Instance methods operate on a user supplied uniform random number generator; they are unsynchronized.
- Static methods operate on a default uniform random number generator; they are synchronized.
Implementation:
- Method: Acceptance/Rejection. High performance implementation.
- This is a port and adaption of Zeta.c from the C-RAND / WIN-RAND library. C-RAND's implementation, in turn, is based upon
J. Dagpunar (1988): Principles of Random Variate Generation, Clarendon Press, Oxford.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Zeta(double ro, double pk, DoubleRandomEngine randomGenerator)Constructs a Zeta distribution.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intnextInt()Returns a random number from the distribution.voidsetState(double ro, double pk)Sets the parameters.static intstaticNextInt(double ro, double pk)Returns a random number from the distribution.java.lang.StringtoString()Returns a String representation of the receiver.-
Methods inherited from class cern.jet.random.tdouble.AbstractDiscreteDistribution
nextDouble
-
Methods inherited from class cern.jet.random.tdouble.AbstractDoubleDistribution
apply, apply, clone, makeDefaultGenerator
-
-
-
-
Constructor Detail
-
Zeta
public Zeta(double ro, double pk, DoubleRandomEngine randomGenerator)Constructs a Zeta distribution.
-
-
Method Detail
-
nextInt
public int nextInt()
Returns a random number from the distribution.- Specified by:
nextIntin classAbstractDiscreteDistribution
-
setState
public void setState(double ro, double pk)Sets the parameters.
-
staticNextInt
public static int staticNextInt(double ro, double pk)Returns a random number from the distribution.
-
toString
public java.lang.String toString()
Returns a String representation of the receiver.- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG