Esempio n. 1
0
        public void DephtFirstSearchTest()
        {
            Graph g = new Graph();

            g.FillGraph(new List <Edge> {
                new Edge(0, 1, Edge.Direction.OneToTwo),
                new Edge(2, 3, Edge.Direction.Both),
                new Edge(1, 3, Edge.Direction.Both),
                new Edge(2, 1, Edge.Direction.TwoToOne),
                new Edge(3, 4, Edge.Direction.Both),
            });

            List <int> visited;

            GraphAlgorithms.DepthFirstSearch(g, out visited);
        }