com.aliasi.stats
Class PoissonConstant

java.lang.Object
  extended by com.aliasi.stats.AbstractDiscreteDistribution
      extended by com.aliasi.stats.PoissonDistribution
          extended by com.aliasi.stats.PoissonConstant
All Implemented Interfaces:
DiscreteDistribution

public class PoissonConstant
extends PoissonDistribution

A PoissonConstant implements a Poisson distribution with a fixed mean. Constant distributions may be compiled to an object output; the distribution read back in will also be a constant Poisson distribution.

Since:
LingPipe2.0
Version:
2.0
Author:
Bob Carpenter

Constructor Summary
PoissonConstant(double mean)
          Construct a constant Poisson distribution with the specified mean.
 
Method Summary
 void compileTo(ObjectOutput objOut)
          Compiles an instance of this constant Poisson distribution to the specified object output.
 double mean()
          Returns the mean of this distribution, which is fixed at construction time.
 
Methods inherited from class com.aliasi.stats.PoissonDistribution
log2Probability, minOutcome, probability, variance
 
Methods inherited from class com.aliasi.stats.AbstractDiscreteDistribution
cumulativeProbability, cumulativeProbabilityGreater, cumulativeProbabilityLess, entropy, maxOutcome
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoissonConstant

public PoissonConstant(double mean)
Construct a constant Poisson distribution with the specified mean.

Parameters:
mean - Mean of distribution.
Throws:
IllegalArgumentException - If mean is not a finite positive number.
Method Detail

compileTo

public void compileTo(ObjectOutput objOut)
               throws IOException
Compiles an instance of this constant Poisson distribution to the specified object output. The corresponding object read in will be an instance of this class, PoissonConstant, with the same mean as this distribution.

Parameters:
objOut - Object output to which this distribution is compiled.
Throws:
IOException - If there is an I/O exception writing.

mean

public double mean()
Returns the mean of this distribution, which is fixed at construction time.

Specified by:
mean in interface DiscreteDistribution
Specified by:
mean in class PoissonDistribution
Returns:
Mean of this Poisson distribution.