def crossing(self):
    'Returns a boolean vector where element M{i} is C{True} iff edge\n        M{i} lies between clusters, C{False} otherwise.'
    membership = [frozenset(cluster) for cluster in self.membership]
    return [membership[v1].isdisjoint(membership[v2]) for (v1, v2) in self.graph.get_edgelist()]
Returns a boolean vector where element M{i} is C{True} iff edge
M{i} lies between clusters, C{False} otherwise.
def crossing(self):
    'Returns a boolean vector where element M{i} is C{True} iff edge\n        M{i} lies between clusters, C{False} otherwise.'
    membership = [frozenset(cluster) for cluster in self.membership]
    return [membership[v1].isdisjoint(membership[v2]) for (v1, v2) in self.graph.get_edgelist()]