private static void VerifySinkConnector <TVertex, TEdge>( [NotNull] IVertexListGraph <TVertex, TEdge> graph, // ReSharper disable once ParameterOnlyUsedForPreconditionCheck.Local [NotNull] MultiSourceSinkGraphAugmentorAlgorithm <TVertex, TEdge> augmentor, [NotNull, ItemNotNull] TVertex[] noOutEdgesVertices) where TEdge : IEdge <TVertex> { foreach (TVertex vertex in noOutEdgesVertices) { Assert.IsTrue(graph.ContainsEdge(vertex, augmentor.SuperSink)); } foreach (TVertex vertex in graph.Vertices.Except(noOutEdgesVertices)) { if (vertex.Equals(augmentor.SuperSource)) { continue; } if (vertex.Equals(augmentor.SuperSink)) { continue; } Assert.IsFalse(graph.ContainsEdge(vertex, augmentor.SuperSink)); } }
private static void VerifySinkConnector<TVertex, TEdge>( [NotNull] IVertexListGraph<TVertex, TEdge> graph, [NotNull] AllVerticesGraphAugmentorAlgorithm<TVertex, TEdge> augmentor) where TEdge : IEdge<TVertex> { foreach (TVertex vertex in graph.Vertices) { if (vertex.Equals(augmentor.SuperSource)) continue; if (vertex.Equals(augmentor.SuperSink)) continue; Assert.IsTrue(graph.ContainsEdge(vertex, augmentor.SuperSink)); } }