Ejemplo n.º 1
0
        internal void CycleFinderTest2()
        {
            var g = WestGraph2();
            CycleFinder <BasicEdgeNode, BasicEdge> cf = new CycleFinder <BasicEdgeNode, BasicEdge>(g);

            cf.AddEdge    += delegate(BasicEdge edge) { Console.Write(" " + edge); };
            cf.BeginCycle += delegate() { Console.Write("["); };
            cf.EndCycle   += delegate() { Console.Write("]"); };
            cf.Search();
            Console.WriteLine();
        }
Ejemplo n.º 2
0
        internal void CycleFinderTest()
        {
            var g = WestGraph();
            CycleFinder <BasicNode> cf = new CycleFinder <BasicNode>(g);

            cf.AddNode    += delegate(BasicNode node) { Console.Write(" " + node); };
            cf.BeginCycle += delegate() { Console.Write("["); };
            cf.EndCycle   += delegate() { Console.Write("]"); };
            cf.Search();
            Console.WriteLine();
        }