Example #1
0
        static void task4b()
        {
            Graph gr1 = new Graph("input.txt");

            foreach (object name in gr1.GetNodeNames())
            {
                var temp = gr1.DoBellman(name);
                foreach (var item in temp)
                {
                    Console.WriteLine("{0}  {1}  {2}", name.ToString(), item.Key, item.Value);
                }
            }
        }
Example #2
0
        static void Going1()
        {
            Graph  gr    = new Graph("input.txt");
            var    nodes = gr.GetNodeNames();
            object start = "Sadovaya/Sennaya/Spasskaya";

            foreach (var node in nodes)
            {
                int temp = gr.FindPaths(start, node).Count;
                if (!Equals(start, node))
                {
                    Console.WriteLine(node.ToString() + " " + temp.ToString());
                }
            }
            Console.ReadKey();
        }