コード例 #1
0
 /**
  * Starts with a constraint propagation if AC-3 is enabled and then calls
  * the super class implementation.
  */
 public Assignment solve(CSP csp)
 {
     if (inferenceStrategy == Inference.AC3)
     {
         DomainRestoreInfo info = new AC3Strategy().reduceDomains(csp);
         if (!info.isEmpty())
         {
             fireStateChanged(csp);
             if (info.isEmptyDomainFound())
                 return null;
         }
     }
     return super.solve(csp);
 }
コード例 #2
0
 /**
  * Starts with a constraint propagation if AC-3 is enabled and then calls
  * the super class implementation.
  */
 public Assignment solve(CSP csp)
 {
     if (inferenceStrategy == Inference.AC3)
     {
         DomainRestoreInfo info = new AC3Strategy().reduceDomains(csp);
         if (!info.isEmpty())
         {
             fireStateChanged(csp);
             if (info.isEmptyDomainFound())
             {
                 return(null);
             }
         }
     }
     return(super.solve(csp));
 }