def __init__(self, membership, params=None):
    "Constructor.\n\n        @param membership: the membership list -- that is, the cluster\n          index in which each element of the set belongs to.\n        @param params: additional parameters to be stored in this\n          object's dictionary."
    self._membership = list(membership)
    if (len(self._membership) > 0):
        self._len = (max((m for m in self._membership if (m is not None))) + 1)
    else:
        self._len = 0
    if params:
        self.__dict__.update(params)
Constructor.

@param membership: the membership list -- that is, the cluster
  index in which each element of the set belongs to.
@param params: additional parameters to be stored in this
  object's dictionary.
def __init__(self, membership, params=None):
    "Constructor.\n\n        @param membership: the membership list -- that is, the cluster\n          index in which each element of the set belongs to.\n        @param params: additional parameters to be stored in this\n          object's dictionary."
    self._membership = list(membership)
    if (len(self._membership) > 0):
        self._len = (max((m for m in self._membership if (m is not None))) + 1)
    else:
        self._len = 0
    if params:
        self.__dict__.update(params)