public void InsertValues() { int temp; int div = 1; bool value = true, a, b, c, d, F; for (int indexV = 0; indexV < cantVars; indexV++) { temp = comb / (2 * div); for (int indexXYZW = 0; indexXYZW < comb; indexXYZW++) { if (indexXYZW % temp == 0) { value = !value; } Vars.SetValue(value, indexXYZW, indexV); a = Convert.ToBoolean(Vars.GetValue(indexXYZW, 0)); b = Convert.ToBoolean(Vars.GetValue(indexXYZW, 1)); c = Convert.ToBoolean(Vars.GetValue(indexXYZW, 2)); d = Convert.ToBoolean(Vars.GetValue(indexXYZW, 3)); F = Operations(a, b, c, d); Vars.SetValue(F, indexXYZW, cantVars); } div *= 2; } }
public void CreateTable() { for (int i = 0; i < comb; i++) { for (int j = 0; j < cantVars + 1; j++) { Table[j, i].Value = ((Convert.ToBoolean(Vars.GetValue(i, j)) == true) ? 1 : 0); } } }
public void SelectMinTerms() { for (int i = 0; i < comb; i++) { if ((Convert.ToBoolean(Vars.GetValue(i, cantVars)) == true)) { Table[cantVars, i].Style.BackColor = c; } } }