示例#1
0
文件: BDDToDNF.cs 项目: IrinaLen/SAT
 public BDDToDNF(BDDNode bdd)
 {
     ToDNF("", bdd);
     if (total == "")
     {
         if (bdd.GetId() == 0)
         {
             total = "тождественная ложь";
         }
         if (bdd.GetId() == 1)
         {
             total = "тождественния истина";
         }
     }
 }
示例#2
0
文件: BDDToDNF.cs 项目: IrinaLen/SAT
 private void ToDNF(string curConj, BDDNode node)
 {
     if (node.GetId() == 0)
     {
         return;
     }
     if (node.GetId() == 1)
     {
         if (total.Any())
         {
             total += " + " + curConj;
         }
         else
         {
             total += curConj;
         }
         return;
     }
     ToDNF(curConj + "X" + node.GetVarId() + "\"", node.GetLow());
     ToDNF(curConj + "X" + node.GetVarId(), node.GetHigh());
 }