//конструктор
 public ExactAlgorithm(ListOfPoints _list_of_points, Color[] _colors, int[,] _graph, int[] _color_array)
 {
     list_of_points = _list_of_points;
     colors         = _colors;
     graph          = _graph;
     color_array    = _color_array;
     count          = list_of_points.Count();
 }
Beispiel #2
0
        //Конструктор генетического алгоритма
        public GeneticAlgorithm(ListOfPoints _list_of_points, Color[] _colors, int[,] _graph, int[] _color_array,
                                int pop_size, int count_of_gen, double mutations)
        {
            list_of_points = _list_of_points;
            colors         = _colors;
            graph          = _graph;
            color_array    = _color_array;

            count = list_of_points.Count();


            population_size      = pop_size;
            count_of_generations = count_of_gen;
            mutation_rate        = mutations;

            population = new ChildOfPopulation[population_size];
        }
Beispiel #3
0
 int Count()
 {
     return(list_of_points_exact.Count());
 }