Interface ZipfDistribution
- All Superinterfaces:
DiscreteDistribution,Distribution,IntegerDistribution
- All Known Implementing Classes:
ZipfDistributionImpl
The Zipf (or zeta) Distribution.
References:
-
Method Summary
Modifier and TypeMethodDescriptiondoubleGet the exponent characterising the distribution.intGet the number of elements (e.g.voidsetExponent(double s) Deprecated.as of v2.1voidsetNumberOfElements(int n) Deprecated.as of v2.1Methods inherited from interface org.apache.commons.math.distribution.DiscreteDistribution
probabilityMethods inherited from interface org.apache.commons.math.distribution.Distribution
cumulativeProbability, cumulativeProbabilityMethods inherited from interface org.apache.commons.math.distribution.IntegerDistribution
cumulativeProbability, cumulativeProbability, inverseCumulativeProbability, probability
-
Method Details
-
getNumberOfElements
int getNumberOfElements()Get the number of elements (e.g. corpus size) for the distribution.- Returns:
- the number of elements
-
setNumberOfElements
Deprecated.as of v2.1Set the number of elements (e.g. corpus size) for the distribution. The parameter value must be positive; otherwise anIllegalArgumentExceptionis thrown.- Parameters:
n- the number of elements- Throws:
IllegalArgumentException- if n ≤ 0
-
getExponent
double getExponent()Get the exponent characterising the distribution.- Returns:
- the exponent
-
setExponent
Deprecated.as of v2.1Set the exponent characterising the distribution. The parameter value must be positive; otherwise anIllegalArgumentExceptionis thrown.- Parameters:
s- the exponent- Throws:
IllegalArgumentException- if s ≤ 0.0
-