(self, merges)
Creates a hierarchical clustering.

        @param merges: the merge history either in matrix or tuple format
Creates a hierarchical clustering.
Creates a hierarchical clustering .
def __init__(self, merges):
        """Creates a hierarchical clustering.

        @param merges: the merge history either in matrix or tuple format"""
        self._merges = [tuple(pair) for pair in merges]
        self._nmerges = len(self._merges)
        if self._nmerges:
            self._nitems = max(self._merges[-1]) - self._nmerges + 2
        else:
            self._nitems = 0
        self._names = None
def __init__ ( self , merges ) : self . _merges = [ tuple ( pair ) for pair in merges ] self . _nmerges = len ( self . _merges ) if self . _nmerges : self . _nitems = max ( self . _merges [ - 1 ] ) - self . _nmerges + 2 else : self . _nitems = 0 self . _names = None