Ejemplo n.º 1
0
 @Override
 public IntDecision duplicate() {
   IntDecision d = poolManager.getE();
   if (d == null) {
     d = new IntDecision(poolManager);
   }
   d.set(var, value, assignment);
   return d;
 }
Ejemplo n.º 2
0
 /** @return a copy of this decision wherein the he decision operator is reversed */
 @SuppressWarnings("unchecked")
 public IntDecision flip() {
   IntDecision d = poolManager.getE();
   if (d == null) {
     d = new IntDecision(poolManager);
   }
   int val = value;
   if (assignment == DecisionOperatorFactory.makeIntSplit()) {
     val++;
   } else if (assignment == DecisionOperatorFactory.makeIntReverseSplit()) {
     val--;
   }
   d.set(var, val, assignment.opposite());
   return d;
 }