Parallel Colt 0.7.2

Class Zeta

  extended by cern.colt.PersistentObject
      extended by cern.jet.random.tdouble.AbstractDoubleDistribution
          extended by cern.jet.random.tdouble.AbstractDiscreteDistribution
              extended by cern.jet.random.tdouble.Zeta
All Implemented Interfaces:
DoubleFunction, IntFunction, Serializable, 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.


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.

1.0, 09/24/99
See Also:
Serialized Form

Field Summary
Fields inherited from class cern.colt.PersistentObject
Constructor Summary
Zeta(double ro, double pk, DoubleRandomEngine randomGenerator)
          Constructs a Zeta distribution.
Method Summary
 int nextInt()
          Returns a random number from the distribution.
 void setState(double ro, double pk)
          Sets the parameters.
static int staticNextInt(double ro, double pk)
          Returns a random number from the distribution.
 String toString()
          Returns a String representation of the receiver.
Methods inherited from class cern.jet.random.tdouble.AbstractDiscreteDistribution
Methods inherited from class cern.jet.random.tdouble.AbstractDoubleDistribution
apply, apply, clone, makeDefaultGenerator
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public Zeta(double ro,
            double pk,
            DoubleRandomEngine randomGenerator)
Constructs a Zeta distribution.

Method Detail


public int nextInt()
Returns a random number from the distribution.

Specified by:
nextInt in class AbstractDiscreteDistribution


public void setState(double ro,
                     double pk)
Sets the parameters.


public static int staticNextInt(double ro,
                                double pk)
Returns a random number from the distribution.


public String toString()
Returns a String representation of the receiver.

toString in class Object

Parallel Colt 0.7.2

Jump to the Parallel Colt Homepage