Class Poisson
java.lang.Object
org.ojalgo.random.RandomNumber
org.ojalgo.random.AbstractDiscrete
org.ojalgo.random.Poisson
- All Implemented Interfaces:
Comparable<RandomNumber>, DoubleSupplier, Supplier<Double>, BasicFunction, NullaryFunction<Double>, PrimitiveFunction.Nullary, DiscreteDistribution, Distribution, AccessScalar<Double>, ComparableNumber<RandomNumber>, NumberDefinition
The Poisson distribution is a discrete probability distribution that expresses the probability of a given
number of events occurring in a fixed interval of time and/or space if these events occur with a known
average rate and independently of the time since the last event. (The Poisson distribution can also be used
for the number of events in other specified intervals such as distance, area or volume.) Distribution of
number of points in random point process under certain simple assumptions. Approximation to the binomial
distribution when aCount is large and aProbability is small. aLambda = aCount * aProbability.
-
Nested Class Summary
Nested classes/interfaces inherited from interface BasicFunction
BasicFunction.Differentiable<N,F>, BasicFunction.Integratable<N, F>, BasicFunction.PlainUnary<T, R> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublegenerate()doubledoublegetProbability(int value) Probability density functiondoubleSubclasses must override either getStandardDeviation() or getVariance()!static Poissonof(double lambda) Methods inherited from class RandomNumber
checkProbabilty, compareTo, doubleValue, floatValue, getStandardDeviation, intValue, invoke, longValue, newSampleSet, random, setRandom, setSeed, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Distribution
getStandardDeviationMethods inherited from interface NullaryFunction
andThen, get, getAsDoubleMethods inherited from interface NumberDefinition
booleanValue, byteValue, shortValue
-
Field Details
-
myLambda
private final double myLambda
-
-
Constructor Details
-
Poisson
public Poisson() -
Poisson
public Poisson(double lambda)
-
-
Method Details
-
of
-
getExpected
public double getExpected() -
getProbability
public double getProbability(int value) Description copied from interface:DiscreteDistributionProbability density function -
getVariance
public double getVariance()Description copied from class:RandomNumberSubclasses must override either getStandardDeviation() or getVariance()!- Specified by:
getVariancein interfaceDistribution- Overrides:
getVariancein classRandomNumber- See Also:
-
generate
protected double generate()- Specified by:
generatein classRandomNumber
-