Ejemplo n.º 1
0
 def relabel(self, substitution, substitution_keys, revert=True):
     self.__vertices = relab.relabel_sequence(self.__vertices, substitution)
     self.__edges = relab.relabel_dict(self.__edges, substitution,
                                       substitution_keys)
     if not revert:
         return None, None
     return relab.revert_substitution(
         substitution), relab.revert_substitution(substitution_keys)
Ejemplo n.º 2
0
 def relabel(self, substitution, substitution_edges):
     self.bags = relab.relabel_dict(self.bags, substitution, typ=set)
     # print self.bags
     # assert(len(self.bags) == 0)
     self._relabel(substitution_edges)
Ejemplo n.º 3
0
 def _relabel(self, substitution_edges):
     self.hyperedge_function = {
         node: relab.relabel_dict(he, substitution_keys=substitution_edges)
         for node, he in self.hyperedge_function.iteritems()
     }