Example #1
0
        public static Grapher <VertexBase> B()
        {
            var graph = FileParser.Parse(@"TestFiles\Dijkstra.txt");

            graph = GreedyColAlgorithm.ColorVertices(graph);
            return(graph);
        }
Example #2
0
        public static Grapher <VertexBase> B()
        {
            var graph = FileParser.Parse(@"TestFiles\Sudoku.txt"); // Knoten sind kästchenweise von links nach rechts und oben nach unten alphabetisch benannt
            var prefilledSudokuFields = new Dictionary <String, int>();

            prefilledSudokuFields.Add("E", 3);
            prefilledSudokuFields.Add("D", 1);
            prefilledSudokuFields.Add("I", 1);
            prefilledSudokuFields.Add("L", 3);
            prefilledSudokuFields.Add("P", 0);

            graph.Vertices.ForEach(v => v.Color = -1);

            SetPrefilledSudokuFields(graph, prefilledSudokuFields);

            var newgraph = graph.Clone();

            for (int i = 0; i < 1000; i++)
            {
                newgraph = GreedyColAlgorithm.ColorVerticesVarPrefilledRandom(graph);
            }

            return(newgraph);
        }