public void CondensateAndCheckDAG( [PexAssumeNotNull]IVertexAndEdgeListGraph<string, Edge<string>> g) { this.algo = new CondensationGraphAlgorithm<string, Edge<string>, AdjacencyGraph<string, Edge<string>>>(g); algo.Compute(); CheckDAG(g); }
public void CondensateAndCheckComponentCount(IVertexAndEdgeListGraph<string, Edge<string>> g) { this.algo = new CondensationGraphAlgorithm<string, Edge<string>, AdjacencyGraph<string, Edge<string>>>(g); this.algo.StronglyConnected = false; algo.Compute(); CheckComponentCount(g); }
private static void RunWeaklyConnectedCondensateAndCheck <TVertex, TEdge>( [NotNull] IVertexAndEdgeListGraph <TVertex, TEdge> graph) where TEdge : IEdge <TVertex> { var algorithm = new CondensationGraphAlgorithm <TVertex, TEdge, AdjacencyGraph <TVertex, TEdge> >(graph) { StronglyConnected = false }; algorithm.Compute(); CheckVertexCount(graph, algorithm); CheckEdgeCount(graph, algorithm); CheckComponentCount(graph, algorithm); }
public static IMutableBidirectionalGraph <TGraph, CondensatedEdge <TVertex, TEdge, TGraph> > Condensate <TVertex, TEdge, TGraph>( IVertexAndEdgeListGraph <TVertex, TEdge> g) where TEdge : IEdge <TVertex> where TGraph : IMutableVertexAndEdgeListGraph <TVertex, TEdge>, new() { if (g == null) { throw new ArgumentNullException("g"); } CondensationGraphAlgorithm <TVertex, TEdge, TGraph> condensator = new CondensationGraphAlgorithm <TVertex, TEdge, TGraph>(g); condensator.Compute(); return(condensator.CondensatedGraph); }