예제 #1
0
    def merge_cliques(self, categorize_first=True):
        """
        Merges all nodes that are connected by `same_as` edges, or are marked
        as equivalent by a nodes `same_as` property.

        The clique leader chosen depends on the categories within that clique.
        For this reason it's useful to run the `categorize` method first.
        """
        if categorize_first:
            self.categorize()
        self.graph = clique_merge(self.graph)
예제 #2
0
 def merge_cliques(self):
     """
     Merges all nodes that are connected by `same_as` edges, or are marked
     as equivalent by a nodes `same_as` property.
     """
     self.graph = clique_merge(self.graph)