Package repast.simphony.random
Interface RandomRegistry
- All Known Implementing Classes:
DefaultRandomRegistry
public interface RandomRegistry
A registry of random streams.
- Author:
- Jerry Vos
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncern.jet.random.BetacreateBeta(double alpha, double beta) Creates the default beta distribution using the default random number generator.cern.jet.random.BinomialcreateBinomial(int n, double p) Creates the default binomial distribution using the default random number generator.cern.jet.random.BreitWignercreateBreitWigner(double mean, double gamma, double cut) Creates the default Breit Wigner distribution using the default random number generator.cern.jet.random.BreitWignerMeanSquarecreateBreitWignerMeanSquareState(double mean, double gamma, double cut) Creates the default Breit Wigner mean square state distribution using the default random number generator.cern.jet.random.ChiSquarecreateChiSquare(double freedom) Creates the default chi square distribution using the default random number generator.cern.jet.random.EmpiricalcreateEmpirical(double[] pdf, int interpolationType) Creates the default empirical distribution using the default random number generator.cern.jet.random.EmpiricalWalkercreateEmpiricalWalker(double[] pdf, int interpolationType) Creates the default empirical walker distribution using the default random number generator.cern.jet.random.ExponentialcreateExponential(double lambda) Creates the default exponential distribution using the default random number generator.cern.jet.random.ExponentialPowercreateExponentialPower(double tau) Creates the default exponential power distribution using the default random number generator.cern.jet.random.GammacreateGamma(double alpha, double lambda) Creates the default gamma distribution using the default random number generator.cern.jet.random.HyperboliccreateHyperbolic(double alpha, double beta) Creates the default hyperbolic distribution using the default random number generator.cern.jet.random.HyperGeometriccreateHyperGeometric(int N, int s, int n) Creates the default hyper geometric distribution using the default random number generator.cern.jet.random.LogarithmiccreateLogarithmic(double p) Creates the default logarithmic distribution using the default random number generator.cern.jet.random.NegativeBinomialcreateNegativeBinomial(int n, double p) Creates the default negative binomial distribution using the default random number generator.cern.jet.random.NormalcreateNormal(double mean, double standardDeviation) Creates the default normal distribution using the default random number generator.cern.jet.random.PoissoncreatePoisson(double mean) Creates the default Poisson distribution using the default random number generator.cern.jet.random.PoissonSlowcreatePoissonSlow(double mean) Creates the default slower Poisson distribution using the default random number generator.cern.jet.random.StudentTcreateStudentT(double freedom) Creates the default StudentT distribution using the default random number generator.cern.jet.random.UniformCreates the default Unifrom distribution using the default random number generator.cern.jet.random.UniformcreateUniform(double min, double max) Creates the default uniform distribution using the default random number generator.cern.jet.random.VonMisescreateVonMises(double freedom) Creates a default VonMises distribution using the default random number generator.cern.jet.random.ZetacreateZeta(double ro, double pk) Creates the default Zeta distribution using the default random number generator.cern.jet.random.BetagetBeta()Gets the default beta distribution.cern.jet.random.BinomialGets the default binomial distribution.cern.jet.random.BreitWignerGets the default BreitWigner distribution.cern.jet.random.BreitWignerMeanSquareGets the default BreitWignerMeanSquare distribution.cern.jet.random.ChiSquareGets the default Zeta distribution.cern.jet.random.AbstractDistributiongetDistribution(String name) Gets the named previously registered distribution.cern.jet.random.EmpiricalGets the default ChiSquare distribution.cern.jet.random.EmpiricalWalkerGets the default EmpiricalWalker distribution.cern.jet.random.ExponentialGets the default Exponential distribution.cern.jet.random.ExponentialPowerGets the default exponentialPower distribution.cern.jet.random.GammagetGamma()Gets the default gamma distribution.cern.jet.random.engine.RandomEnginegetGenerator(String generatorName) Gets a previously registered random number generator.cern.jet.random.HyperbolicGets the default hyperbolic distribution.cern.jet.random.HyperGeometricGets the default hyperGeometric distribution.cern.jet.random.LogarithmicGets the default logarithmic distribution.cern.jet.random.NegativeBinomialGets the default negativeBinomial distribution.cern.jet.random.NormalGets the default normal distribution.cern.jet.random.PoissonGets the default poisson distribution.cern.jet.random.PoissonSlowGets the default slow poisson distribution.intGets the seed of the named generator.cern.jet.random.StudentTGets the default studentT distribution.cern.jet.random.UniformGets the default uniform distribution.cern.jet.random.VonMisesGets the default vonMises distribution.cern.jet.random.ZetagetZeta()Gets the default Zeta distribution.voidregisterDistribution(String name, cern.jet.random.AbstractDistribution dist) Registers the named random number distribution for later retrieval.cern.jet.random.engine.RandomEngineregisterGenerator(String name, int seed) Creates and registers a new random number generator with the specified name and seed.voidreset()Resets this random registry by doing the following: invalidates any live default distributions removes (de-registers) any non-default distributions removes (de-registers) any non-default random number generators creates a new default random number generator with the current time as its seed creates a new default uniform distributionsvoidsetSeed(int seed) Sets the seed for the default random number generator.
-
Field Details
-
DEFAULT_GENERATOR
-
-
Method Details
-
registerGenerator
Creates and registers a new random number generator with the specified name and seed. The generator can then be retrieved later using #getGenerator(String).This will create a MersenneTwister for the generator.
- Parameters:
name- the name of the generator to create and registerseed- the new generators seed- Returns:
- the new generator itself
-
getGenerator
Gets a previously registered random number generator.- Parameters:
generatorName- the name of the generator to get- Returns:
- a previously registered random number generator.
-
getSeed
Gets the seed of the named generator.- Parameters:
generatorName- the name of the generator- Returns:
- the seed of the named generator.
-
registerDistribution
Registers the named random number distribution for later retrieval.- Parameters:
name- the name of the distributiondist- the distribution to register
-
getDistribution
Gets the named previously registered distribution. Calling code can then cast the distribution into the appropriate type (e.g. a Normal).- Parameters:
name- the name of the distribution to get- Returns:
- the named previously registered distribution.
-
createZeta
cern.jet.random.Zeta createZeta(double ro, double pk) Creates the default Zeta distribution using the default random number generator.- Parameters:
ro-pk-- Returns:
- the created distribution
-
getZeta
cern.jet.random.Zeta getZeta()Gets the default Zeta distribution.- Returns:
- the default Zeta distribution.
-
createVonMises
cern.jet.random.VonMises createVonMises(double freedom) Creates a default VonMises distribution using the default random number generator.- Parameters:
freedom-- Returns:
- the created distribution
-
createUniform
cern.jet.random.Uniform createUniform(double min, double max) Creates the default uniform distribution using the default random number generator.- Parameters:
min-max-- Returns:
- the created distribution
-
createUniform
cern.jet.random.Uniform createUniform()Creates the default Unifrom distribution using the default random number generator.- Returns:
- the created distribution
-
createStudentT
cern.jet.random.StudentT createStudentT(double freedom) Creates the default StudentT distribution using the default random number generator.- Parameters:
freedom-- Returns:
- the created distribution
-
createPoissonSlow
cern.jet.random.PoissonSlow createPoissonSlow(double mean) Creates the default slower Poisson distribution using the default random number generator.- Parameters:
mean-- Returns:
- the created distribution
-
createPoisson
cern.jet.random.Poisson createPoisson(double mean) Creates the default Poisson distribution using the default random number generator.- Parameters:
mean-- Returns:
- the created distribution
-
createNormal
cern.jet.random.Normal createNormal(double mean, double standardDeviation) Creates the default normal distribution using the default random number generator.- Parameters:
mean-standardDeviation-- Returns:
- the created distribution
-
createNegativeBinomial
cern.jet.random.NegativeBinomial createNegativeBinomial(int n, double p) Creates the default negative binomial distribution using the default random number generator.- Parameters:
n-p-- Returns:
- the created distribution
-
createLogarithmic
cern.jet.random.Logarithmic createLogarithmic(double p) Creates the default logarithmic distribution using the default random number generator.- Parameters:
p-- Returns:
- the created distribution
-
createHyperGeometric
cern.jet.random.HyperGeometric createHyperGeometric(int N, int s, int n) Creates the default hyper geometric distribution using the default random number generator.- Parameters:
N-s-n-- Returns:
- the created distribution
-
createHyperbolic
cern.jet.random.Hyperbolic createHyperbolic(double alpha, double beta) Creates the default hyperbolic distribution using the default random number generator.- Parameters:
alpha-beta-- Returns:
- the created distribution
-
createGamma
cern.jet.random.Gamma createGamma(double alpha, double lambda) Creates the default gamma distribution using the default random number generator.- Parameters:
alpha-lambda-- Returns:
- the created distribution
-
createExponentialPower
cern.jet.random.ExponentialPower createExponentialPower(double tau) Creates the default exponential power distribution using the default random number generator.- Parameters:
tau-- Returns:
- the created distribution
-
createExponential
cern.jet.random.Exponential createExponential(double lambda) Creates the default exponential distribution using the default random number generator.- Parameters:
lambda-- Returns:
- the created distribution
-
createEmpiricalWalker
cern.jet.random.EmpiricalWalker createEmpiricalWalker(double[] pdf, int interpolationType) Creates the default empirical walker distribution using the default random number generator.- Parameters:
pdf-interpolationType-- Returns:
- the created distribution
-
createEmpirical
cern.jet.random.Empirical createEmpirical(double[] pdf, int interpolationType) Creates the default empirical distribution using the default random number generator.- Parameters:
pdf-interpolationType-- Returns:
- the created distribution
-
createChiSquare
cern.jet.random.ChiSquare createChiSquare(double freedom) Creates the default chi square distribution using the default random number generator.- Parameters:
freedom-- Returns:
- the created distribution
-
createBreitWignerMeanSquareState
cern.jet.random.BreitWignerMeanSquare createBreitWignerMeanSquareState(double mean, double gamma, double cut) Creates the default Breit Wigner mean square state distribution using the default random number generator.- Parameters:
mean-gamma-cut-- Returns:
- the created distribution
-
createBreitWigner
cern.jet.random.BreitWigner createBreitWigner(double mean, double gamma, double cut) Creates the default Breit Wigner distribution using the default random number generator.- Parameters:
mean-gamma-cut-- Returns:
- the created distribution
-
createBinomial
cern.jet.random.Binomial createBinomial(int n, double p) Creates the default binomial distribution using the default random number generator.- Parameters:
n-p-
-
createBeta
cern.jet.random.Beta createBeta(double alpha, double beta) Creates the default beta distribution using the default random number generator.- Parameters:
alpha-beta-- Returns:
- the created distribution
-
getBeta
cern.jet.random.Beta getBeta()Gets the default beta distribution.- Returns:
- the default beta distribution.
-
getBinomial
cern.jet.random.Binomial getBinomial()Gets the default binomial distribution.- Returns:
- the default binomial distribution.
-
getBreitWigner
cern.jet.random.BreitWigner getBreitWigner()Gets the default BreitWigner distribution.- Returns:
- the default BreitWigner distribution.
-
getBreitWignerMeanSquare
cern.jet.random.BreitWignerMeanSquare getBreitWignerMeanSquare()Gets the default BreitWignerMeanSquare distribution.- Returns:
- the default BreitWignerMeanSquare distribution.
-
getChiSquare
cern.jet.random.ChiSquare getChiSquare()Gets the default Zeta distribution.- Returns:
- the default Zeta distribution.
-
getEmpirical
cern.jet.random.Empirical getEmpirical()Gets the default ChiSquare distribution.- Returns:
- the default ChiSquare distribution.
-
getEmpiricalWalker
cern.jet.random.EmpiricalWalker getEmpiricalWalker()Gets the default EmpiricalWalker distribution.- Returns:
- the default EmpiricalWalker distribution.
-
getExponential
cern.jet.random.Exponential getExponential()Gets the default Exponential distribution.- Returns:
- the default Exponential distribution.
-
getExponentialPower
cern.jet.random.ExponentialPower getExponentialPower()Gets the default exponentialPower distribution.- Returns:
- the default exponentialPower distribution.
-
getGamma
cern.jet.random.Gamma getGamma()Gets the default gamma distribution.- Returns:
- the default gamma distribution.
-
getHyperbolic
cern.jet.random.Hyperbolic getHyperbolic()Gets the default hyperbolic distribution.- Returns:
- the default hyperbolic distribution.
-
getHyperGeometric
cern.jet.random.HyperGeometric getHyperGeometric()Gets the default hyperGeometric distribution.- Returns:
- the default hyperGeometric distribution.
-
getLogarithmic
cern.jet.random.Logarithmic getLogarithmic()Gets the default logarithmic distribution.- Returns:
- the default logarithmic distribution.
-
getNegativeBinomial
cern.jet.random.NegativeBinomial getNegativeBinomial()Gets the default negativeBinomial distribution.- Returns:
- the default negativeBinomial distribution.
-
getNormal
cern.jet.random.Normal getNormal()Gets the default normal distribution.- Returns:
- the default normal distribution.
-
getPoisson
cern.jet.random.Poisson getPoisson()Gets the default poisson distribution.- Returns:
- the default poisson distribution.
-
getPoissonSlow
cern.jet.random.PoissonSlow getPoissonSlow()Gets the default slow poisson distribution.- Returns:
- the default slow poisson distribution.
-
getStudentT
cern.jet.random.StudentT getStudentT()Gets the default studentT distribution.- Returns:
- the default studentT distribution.
-
getUniform
cern.jet.random.Uniform getUniform()Gets the default uniform distribution.- Returns:
- the default uniform distribution.
-
getVonMises
cern.jet.random.VonMises getVonMises()Gets the default vonMises distribution.- Returns:
- the default vonMises distribution.
-
setSeed
void setSeed(int seed) Sets the seed for the default random number generator. Any previously created default distributions will be invalidated.- Parameters:
seed- the new seed
-
reset
void reset()Resets this random registry by doing the following:- invalidates any live default distributions
- removes (de-registers) any non-default distributions
- removes (de-registers) any non-default random number generators
- creates a new default random number generator with the current time as its seed
- creates a new default uniform distributions
-