All Packages Class Hierarchy This Package Previous Next Index
Class sdsu.algorithms.data.Poisson
java.lang.Object
|
+----sdsu.algorithms.data.ProbabilityDistribution
|
+----sdsu.algorithms.data.DiscreteProbability
|
+----sdsu.algorithms.data.Poisson
- public class Poisson
- extends DiscreteProbability
The Poisson distrubution addresses the question of how many events
occur in a unit of time or space.
This class is adapted from Smalltalk-80: The language
and Its Implementation, Goldberg & Robson, Addison-Wesley, 1983, chapter 21,
pages 417-438.
- Version:
- 1.0 10 June 1997
- Author:
- Roger Whitney (whitney@cs.sdsu.edu)
-
Poisson(double)
- Returns a Poisson distribution object.
-
density(double)
- Returns the probability that numberOfEvents will occur
in one unit (time, space).
-
mean()
- Returns the mean of the distribution
-
nextElement()
- Returns the number events that occur in simualtion of
one unit (of time or space).
-
variance()
- Returns the variance of the probability distribution
Poisson
public Poisson(double averageEvents) throws OutOfBoundsException
- Returns a Poisson distribution object.
- Parameters:
- averageEvents - the averate number of events happening per unit (time, space).
- Throws: OutOfBoundsException
- thrown if averageEvents is not greater than 0.0.
density
public double density(double numberOfEvents)
- Returns the probability that numberOfEvents will occur
in one unit (time, space).
- Parameters:
- numberOfEvents - does not make sense unless is integer value.
- Overrides:
- density in class ProbabilityDistribution
mean
public double mean()
- Returns the mean of the distribution
- Overrides:
- mean in class ProbabilityDistribution
variance
public double variance()
- Returns the variance of the probability distribution
- Overrides:
- variance in class ProbabilityDistribution
nextElement
public double nextElement()
- Returns the number events that occur in simualtion of
one unit (of time or space).
- Overrides:
- nextElement in class ProbabilityDistribution
All Packages Class Hierarchy This Package Previous Next Index