jhplot.math
Class Poisson
- java.lang.Object
-
- jhplot.math.Poisson
-
public class Poisson extends java.lang.Object
Build a Poisson distribution
-
-
Constructor Summary
Constructors Constructor and Description Poisson(double lambda)
Build a Poisson random numbers with a given lambdaPoisson(long seed, double lambda)
Build a Posson random numbersPoisson(java.util.Random rand, double lambda)
Build a Posson generator
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static void
main(java.lang.String[] args)
int
next()
Get next Poisson random number with the lambda given in constructorint
next(double lambda)
Get next Poisson random number with a new lambda (overwrides the default)
-
-
-
Constructor Detail
-
Poisson
public Poisson(java.util.Random rand, double lambda)
Build a Posson generator- Parameters:
rand
- input Random generatorlambda
- lambda
-
Poisson
public Poisson(double lambda)
Build a Poisson random numbers with a given lambda- Parameters:
lambda
- Lambda
-
Poisson
public Poisson(long seed, double lambda)
Build a Posson random numbers- Parameters:
seed
- seed to reseed the generatorlambda
- lambda
-
-
Method Detail
-
next
public int next()
Get next Poisson random number with the lambda given in constructor- Returns:
-
next
public int next(double lambda)
Get next Poisson random number with a new lambda (overwrides the default)- Parameters:
lambda
- new lambda- Returns:
-
main
public static final void main(java.lang.String[] args)
-
-
DMelt 3.0 © DataMelt by jWork.ORG