Example #1
0
 def cliques(self, threshold=3, distance=0):
     g = []
     c = cluster.cliques(self, threshold)
     for nodes in c: g.append(cluster.subgraph(self, nodes, distance))
     return g
Example #2
0
 def __sub__(self, graph):
     nodes = cluster.difference(cluster.flatten(self), cluster.flatten(graph))
     all = self | graph
     return cluster.subgraph(all, nodes, 0)
Example #3
0
 def clique(self, id, distance=0):
     return cluster.subgraph(self, cluster.clique(self, id), distance)
Example #4
0
 def sub(self, id, distance=1):
     return cluster.subgraph(self, id, distance)
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 cliques(self, threshold=3, distance=0):
     g = []
     c = cluster.cliques(self, threshold)
     for nodes in c:
         g.append(cluster.subgraph(self, nodes, distance))
     return g
Example #7
0
 def clique(self, id, distance=0):
     return cluster.subgraph(self, cluster.clique(self, id), distance)
Example #8
0
 def __sub__(self, graph):
     nodes = cluster.difference(cluster.flatten(self),
                                cluster.flatten(graph))
     all = self | graph
     return cluster.subgraph(all, nodes, 0)
Example #9
0
 def __and__(self, graph):
     nodes = cluster.intersection(cluster.flatten(self),
                                  cluster.flatten(graph))
     all = self | graph
     return cluster.subgraph(all, nodes, 0)
Example #10
0
 def sub(self, id, distance=1):
     return cluster.subgraph(self, id, distance)