private void bfs_Click(object sender, EventArgs e) { PreConfig("bfs"); Queue <TextBox[, ]> queue = new Queue <TextBox[, ]>(); TextBox[,] start_box = Algo.NewBox(box); queue.Enqueue(start_box); string Result = Algo.BFSAlgo(queue, box, this, txtMemory); PostConfig(); MessageBox.Show(Result); }
private void hillclimbing_Click(object sender, EventArgs e) { PreConfig("hc"); bool[,] is_fixed = Algo.IsFixed(box); TextBox[,] start_box = Algo.NewBox(box); Algo.FillStartBox(ref start_box); Algo.CopyBox(start_box, box); this.Update(); Algo.HillClimbingAlgo(start_box, Algo.HeuristicFunc(start_box), is_fixed, box, this, txtHV, txtMemory); PostConfig(); MessageBox.Show("DONE"); }
private void dfs_Click(object sender, EventArgs e) { PreConfig("dfs"); Stack <TextBox[, ]> stack = new Stack <TextBox[, ]>(); TextBox[,] start_box = Algo.NewBox(box); stack.Push(start_box); string Result = Algo.DFSAlgo(stack, box, this, txtMemory); PostConfig(); MessageBox.Show(Result); }