/// <inheritdoc /> protected override void AugmentGraph() { foreach (TVertex vertex in VisitedGraph.Vertices) { ThrowIfCancellationRequested(); // Is source if (VisitedGraph.IsInEdgesEmpty(vertex)) { AddAugmentedEdge(SuperSource, vertex); } // Is sink if (VisitedGraph.IsOutEdgesEmpty(vertex)) { AddAugmentedEdge(vertex, SuperSink); } } }
/// <inheritdoc /> protected override void AugmentGraph() { ICancelManager cancelManager = Services.CancelManager; foreach (TVertex vertex in VisitedGraph.Vertices) { if (cancelManager.IsCancelling) { break; } // Is source if (VisitedGraph.IsInEdgesEmpty(vertex)) { AddAugmentedEdge(SuperSource, vertex); } // Is sink if (VisitedGraph.IsOutEdgesEmpty(vertex)) { AddAugmentedEdge(vertex, SuperSink); } } }