(self, membership, params=None)
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.
Constructor.
Constructor .
def __init__(self, membership, params=None):
        """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."""
        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)
def __init__ ( self , membership , params = None ) : 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 )