Example #1
0
 def __sub__(self, graph):
     nodes = cluster.difference(cluster.flatten(self), cluster.flatten(graph))
     all = self | graph
     return cluster.subgraph(all, nodes, 0)
Example #2
0
 def __and__(self, graph):
     nodes = cluster.intersection(cluster.flatten(self), cluster.flatten(graph))
     all = self | graph
     return cluster.subgraph(all, nodes, 0)
Example #3
0
 def flatten(self, distance=1):
     return cluster.flatten(self, distance)
Example #4
0
 def __sub__(self, graph):
     nodes = cluster.difference(cluster.flatten(self),
                                cluster.flatten(graph))
     all = self | graph
     return cluster.subgraph(all, nodes, 0)
Example #5
0
 def __and__(self, graph):
     nodes = cluster.intersection(cluster.flatten(self),
                                  cluster.flatten(graph))
     all = self | graph
     return cluster.subgraph(all, nodes, 0)
Example #6
0
 def flatten(self, distance=1):
     return cluster.flatten(self, distance)