pub fn break_at(
    dag: &DirectedAcyclicGraph,
    vertex: usize
) -> (DirectedAcyclicGraph, DirectedAcyclicGraph)
Expand description

Break a DAG into two halves at the vertex vertex. Used as a shrinking strategy for DAGs in the quickcheck::Arbitrary impl.

Note that if there are any edges between the left and the right DAGs, they get broken.

The right DAG is equal in the number of vertices to the left one if |V| is an even number or one bigger if |V| is odd.

We don’t try to be clever here and compute something expensive like connected components as the property that fails might as well be “a graph has more than one connected component”, in which case that clever shrinking algorithm would be useless.