Пример #1
0
        private static void Main()
        {
            try
            {
                GetEntryParameters(out var population, out var populationSize, out string path);

                Graph graph = PrepareGraphWithColoringParameters(path, out var startValues);

                IGraphColoringRequest request = new GraphColoringRequest(startValues, population, populationSize, graph);

                IGraphColoringResponse response = ColoringExecutor.ColorGraph(request);

                ShowResult(response);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
            Console.WriteLine("End");
            Console.ReadLine();
        }
Пример #2
0
        private static void ShowResult(IGraphColoringResponse response)
        {
            GraphWithColoredVertexes gr = response.ColoredGraph;

            Console.WriteLine(gr.PrintGraphColors());
        }