org.apache.commons.math.distribution
Interface ZipfDistribution

All Superinterfaces:
DiscreteDistribution, Distribution, IntegerDistribution
All Known Implementing Classes:
ZipfDistributionImpl

public interface ZipfDistribution
extends IntegerDistribution

The Zipf (or zeta) Distribution.

References:

Version:
$Revision: 729291 $ $Date: 2008-12-24 05:47:53 -0500 (Wed, 24 Dec 2008) $

Method Summary
 double getExponent()
          Get the exponent characterising the distribution.
 int getNumberOfElements()
          Get the number of elements (e.g.
 void setExponent(double s)
          Set the exponent characterising the distribution.
 void setNumberOfElements(int n)
          Set the number of elements (e.g.
 
Methods inherited from interface org.apache.commons.math.distribution.IntegerDistribution
cumulativeProbability, cumulativeProbability, inverseCumulativeProbability, probability
 
Methods inherited from interface org.apache.commons.math.distribution.DiscreteDistribution
probability
 
Methods inherited from interface org.apache.commons.math.distribution.Distribution
cumulativeProbability, cumulativeProbability
 

Method Detail

getNumberOfElements

int getNumberOfElements()
Get the number of elements (e.g. corpus size) for the distribution.

Returns:
the number of elements

setNumberOfElements

void setNumberOfElements(int n)
Set the number of elements (e.g. corpus size) for the distribution. The parameter value must be positive; otherwise an IllegalArgumentException is thrown.

Parameters:
n - the number of elements
Throws:
java.lang.IllegalArgumentException - if n ≤ 0

getExponent

double getExponent()
Get the exponent characterising the distribution.

Returns:
the exponent

setExponent

void setExponent(double s)
Set the exponent characterising the distribution. The parameter value must be positive; otherwise an IllegalArgumentException is thrown.

Parameters:
s - the exponent
Throws:
java.lang.IllegalArgumentException - if s ≤ 0.0


Copyright (c) 2003-2009 Apache Software Foundation