Ejemplo n.º 1
0
        public void SameEdges <TVertex, TEdge>([PexAssumeNotNull] IVertexAndEdgeListGraph <TVertex, TEdge> g)
            where TEdge : IEdge <TVertex>
        {
            var ag = GraphExtensions.ToArrayAdjacencyGraph(g);

            PexAssertEx.AreElementsEqual(g.Edges, ag.Edges, (l, r) => l.Equals(r));
        }
Ejemplo n.º 2
0
        public void SameOutEdges <TVertex, TEdge>([PexAssumeNotNull] IVertexAndEdgeListGraph <TVertex, TEdge> g)
            where TEdge : IEdge <TVertex>
        {
            var ag = GraphExtensions.ToArrayAdjacencyGraph(g);

            foreach (var v in g.Vertices)
            {
                PexAssertEx.AreElementsEqual(g.OutEdges(v), ag.OutEdges(v), (l, r) => l.Equals(r));
            }
        }