be.ac.ulg.montefiore.run.distributions
Interface DiscreteDistribution

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
PoissonDistribution

public interface DiscreteDistribution
extends java.io.Serializable

This interface must be implemented by all the package's classes implementing a discrete random distribution. Distributions are not mutable.


Method Summary
 int generate()
          Generates a pseudo-random number.
 double probability(int n)
          Returns the probability of a given number.
 

Method Detail

generate

int generate()
Generates a pseudo-random number. The numbers generated by this function are drawn according to the pseudo-random distribution described by the object that implements it.

Returns:
A pseudo-random number.

probability

double probability(int n)
Returns the probability of a given number.

Parameters:
n - An integer.


Copyright © 2004,2005 Jean-Marc François.