Package repast.simphony.random
Class DistributionsAdapter
java.lang.Object
cern.colt.PersistentObject
cern.jet.random.AbstractDistribution
repast.simphony.random.DistributionsAdapter
- All Implemented Interfaces:
cern.colt.function.DoubleFunction,cern.colt.function.IntFunction,Serializable,Cloneable
- Direct Known Subclasses:
Lambda
public class DistributionsAdapter
extends cern.jet.random.AbstractDistribution
A wrapper around the
Distributions class. Instances of this class will implement the
nextMethod and most likely have it delegate to some specific nextXYZ method. For instance, the
Lambda subclass delegates to the nextLambda method.
This class's nextDouble() method always throws an
UnsupportedOperationException.- Author:
- Jerry Vos
- See Also:
-
Field Summary
Fields inherited from class cern.jet.random.AbstractDistribution
randomGenerator -
Constructor Summary
ConstructorsConstructorDescriptionDistributionsAdapter(cern.jet.random.engine.RandomEngine randomGenerator) Constructs this with the specified random number generator -
Method Summary
Modifier and TypeMethodDescriptiondoublegeometricPdf(int k, double p) doublenextBurr1(double r, int nr) doublenextBurr2(double r, double k, int nr) doubledoubleThrows anUnsupportedOperationException.doublenextErlang(double variance, double mean) doublenextGeometric(double p) doublenextLamdba(double l3, double l4) Calls the distribution with the specified parameters and this distributions random generator.doubledoubledoublenextPowLaw(double alpha, double cut) doubledoublenextWeibull(double alpha, double beta) doublenextZipfInt(double z) Methods inherited from class cern.jet.random.AbstractDistribution
apply, apply, clone, getRandomGenerator, makeDefaultGenerator, nextInt, setRandomGenerator
-
Constructor Details
-
DistributionsAdapter
public DistributionsAdapter(cern.jet.random.engine.RandomEngine randomGenerator) Constructs this with the specified random number generator- Parameters:
randomGenerator- the random number generator
-
-
Method Details
-
nextDouble
Throws anUnsupportedOperationException.- Specified by:
nextDoublein classcern.jet.random.AbstractDistribution- Throws:
UnsupportedOperationException
-
nextLamdba
public double nextLamdba(double l3, double l4) Calls the distribution with the specified parameters and this distributions random generator.- Parameters:
l3- the distribution's l3 parameterl4- the distribution's l3 parameter- Returns:
- the value from
Distributions.nextLambda(double, double, RandomEngine)
-
geometricPdf
public double geometricPdf(int k, double p) -
nextBurr1
public double nextBurr1(double r, int nr) -
nextBurr2
public double nextBurr2(double r, double k, int nr) -
nextCauchy
public double nextCauchy() -
nextErlang
public double nextErlang(double variance, double mean) -
nextGeometric
public double nextGeometric(double p) -
nextLaplace
public double nextLaplace() -
nextLogistic
public double nextLogistic() -
nextPowLaw
public double nextPowLaw(double alpha, double cut) -
nextTriangular
public double nextTriangular() -
nextWeibull
public double nextWeibull(double alpha, double beta) -
nextZipfInt
public double nextZipfInt(double z)
-