':param freqdist: The frequency counts upon which to base the
estimation.
:type freqdist: FreqDist
:param bins: The number of possible event types. This must be
larger than the number of bins in the ``freqdist``. If None,
then it\'s assumed to be equal to ``freqdist``.B() + 1
:type bins: int'

def __init__(self, freqdist, bins=None):

    assert ((bins is None) or (bins > freqdist.B())), (u'bins    parameter    must    not    be    less    than    %d=freqdist.B()+1' % (freqdist.B() + 1))
    if (bins is None):
        bins = (freqdist.B() + 1)
    self._freqdist = freqdist
    self._bins = bins
    (r, nr) = self._r_Nr()
    self.find_best_fit(r, nr)
    self._switch(r, nr)
    self._renormalize(r, nr)
