//конструктор 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(); }
private void buttonClear_Click(object sender, EventArgs e) { pictureBoxGraph.Image = null; list_of_points_exact = new ListOfPoints(); list_of_points_genetic = new ListOfPoints(); graph = new int[0, 0]; color_array_exact = new int[0]; color_array_genetic = new int[0]; textBoxMinChromaticExact.Clear(); textBoxMinChromaticGenetic.Clear(); textBoxTimeExact.Clear(); textBoxTimeGenetic.Clear(); pictureBoxGenetic.Image = null; }
public MainForm() { InitializeComponent(); graphicsExact = pictureBoxGraph.CreateGraphics(); graphicsGenetic = pictureBoxGenetic.CreateGraphics(); captionHeight = SystemInformation.CaptionHeight; borderSize = SystemInformation.BorderSize; list_of_points_exact = new ListOfPoints(); list_of_points_genetic = new ListOfPoints(); graph = new int[0, 0]; radius = 10; color_array_exact = new int[0]; color_array_genetic = new int[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]; }