def __init__(self, graph, blocks=None, cohesion=None, parent=None):
    'Constructs a new cohesive block structure for the given graph.\n\n        If any of I{blocks}, I{cohesion} or I{parent} is C{None}, all the\n        arguments will be ignored and L{Graph.cohesive_blocks()} will be\n        called to calculate the cohesive blocks. Otherwise, these three\n        variables should describe the *result* of a cohesive block structure\n        calculation. Chances are that you never have to construct L{CohesiveBlocks}\n        instances directly, just use L{Graph.cohesive_blocks()}.\n\n        @param graph: the graph itself\n        @param blocks: a list containing the blocks; each block is described\n          as a list containing vertex IDs.\n        @param cohesion: the cohesion of each block. The length of this list\n          must be equal to the length of I{blocks}.\n        @param parent: the parent block of each block. Negative values or\n          C{None} mean that there is no parent block for that block. There\n          should be only one parent block, which covers the entire graph.\n        @see: Graph.cohesive_blocks()\n        '
    if ((blocks is None) or (cohesion is None) or (parent is None)):
        (blocks, cohesion, parent) = graph.cohesive_blocks()
    VertexCover.__init__(self, graph, blocks)
    self._cohesion = cohesion
    self._parent = parent
    for (idx, p) in enumerate(self._parent):
        if (p < 0):
            self._parent[idx] = None
Constructs a new cohesive block structure for the given graph.

If any of I{blocks}, I{cohesion} or I{parent} is C{None}, all the
arguments will be ignored and L{Graph.cohesive_blocks()} will be
called to calculate the cohesive blocks. Otherwise, these three
variables should describe the *result* of a cohesive block structure
calculation. Chances are that you never have to construct L{CohesiveBlocks}
instances directly, just use L{Graph.cohesive_blocks()}.

@param graph: the graph itself
@param blocks: a list containing the blocks; each block is described
  as a list containing vertex IDs.
@param cohesion: the cohesion of each block. The length of this list
  must be equal to the length of I{blocks}.
@param parent: the parent block of each block. Negative values or
  C{None} mean that there is no parent block for that block. There
  should be only one parent block, which covers the entire graph.
@see: Graph.cohesive_blocks()
def __init__(self, graph, blocks=None, cohesion=None, parent=None):
    'Constructs a new cohesive block structure for the given graph.\n\n        If any of I{blocks}, I{cohesion} or I{parent} is C{None}, all the\n        arguments will be ignored and L{Graph.cohesive_blocks()} will be\n        called to calculate the cohesive blocks. Otherwise, these three\n        variables should describe the *result* of a cohesive block structure\n        calculation. Chances are that you never have to construct L{CohesiveBlocks}\n        instances directly, just use L{Graph.cohesive_blocks()}.\n\n        @param graph: the graph itself\n        @param blocks: a list containing the blocks; each block is described\n          as a list containing vertex IDs.\n        @param cohesion: the cohesion of each block. The length of this list\n          must be equal to the length of I{blocks}.\n        @param parent: the parent block of each block. Negative values or\n          C{None} mean that there is no parent block for that block. There\n          should be only one parent block, which covers the entire graph.\n        @see: Graph.cohesive_blocks()\n        '
    if ((blocks is None) or (cohesion is None) or (parent is None)):
        (blocks, cohesion, parent) = graph.cohesive_blocks()
    VertexCover.__init__(self, graph, blocks)
    self._cohesion = cohesion
    self._parent = parent
    for (idx, p) in enumerate(self._parent):
        if (p < 0):
            self._parent[idx] = None