public void Roots <T>(IVertexAndEdgeListGraph <T, Edge <T> > g) { var roots = new HashSet <T>(g.Roots()); foreach (var edge in g.Edges) { Assert.IsFalse(roots.Contains(edge.Target)); } }
private void Roots <T>(IVertexAndEdgeListGraph <T, Edge <T> > g) { var roots = new HashSet <T>(g.Roots()); foreach (var edge in g.Edges) { Assert.Contains(edge.Target, roots); } }
private static void Roots <T>([NotNull] IVertexAndEdgeListGraph <T, Edge <T> > graph) { var roots = new HashSet <T>(graph.Roots()); foreach (Edge <T> edge in graph.Edges) { Assert.IsFalse(roots.Contains(edge.Target)); } }