Package cern.jet.random
Class AbstractDiscreteDistribution
java.lang.Object
cern.colt.PersistentObject
cern.jet.random.AbstractDistribution
cern.jet.random.AbstractDiscreteDistribution
- All Implemented Interfaces:
DoubleFunction
,IntFunction
,Serializable
,Cloneable
- Direct Known Subclasses:
Binomial
,EmpiricalWalker
,HyperGeometric
,NegativeBinomial
,Poisson
,PoissonSlow
,Zeta
Abstract base class for all discrete distributions.
- Version:
- 1.0, 09/24/99
- See Also:
-
Field Summary
Fields inherited from class cern.jet.random.AbstractDistribution
randomGenerator
Fields inherited from class cern.colt.PersistentObject
serialVersionUID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Makes this class non instantiable, but still let's others inherit from it. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns a random number from the distribution; returns (double) nextInt().abstract int
nextInt()
Returns a random number from the distribution.Methods inherited from class cern.jet.random.AbstractDistribution
apply, apply, clone, getRandomGenerator, makeDefaultGenerator, setRandomGenerator
-
Constructor Details
-
AbstractDiscreteDistribution
protected AbstractDiscreteDistribution()Makes this class non instantiable, but still let's others inherit from it.
-
-
Method Details
-
nextDouble
public double nextDouble()Returns a random number from the distribution; returns (double) nextInt().- Specified by:
nextDouble
in classAbstractDistribution
-
nextInt
public abstract int nextInt()Returns a random number from the distribution.- Overrides:
nextInt
in classAbstractDistribution
-