Colt 1.0.3

cern.jet.random
Class Zeta

java.lang.Object
  |
  +--cern.colt.PersistentObject
        |
        +--cern.jet.random.AbstractDistribution
              |
              +--cern.jet.random.AbstractDiscreteDistribution
                    |
                    +--cern.jet.random.Zeta
All Implemented Interfaces:
Cloneable, DoubleFunction, IntFunction, Serializable

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

Fields inherited from class cern.colt.PersistentObject
serialVersionUID
 
Constructor Summary
Zeta(double ro, double pk, RandomElement 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.AbstractDiscreteDistribution
nextDouble
 
Methods inherited from class cern.jet.random.AbstractDistribution
apply, apply, clone, makeDefaultGenerator
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Zeta

public Zeta(double ro,
            double pk,
            RandomElement randomGenerator)
Constructs a Zeta distribution.
Method Detail

nextInt

public int nextInt()
Returns a random number from the distribution.
Overrides:
nextInt in class AbstractDiscreteDistribution

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 String toString()
Returns a String representation of the receiver.
Overrides:
toString in class Object

Colt 1.0.3

Submit a bug or feature. Check the Colt home page for the latest news.