コード例 #1
0
 @Override
 public IntDecision duplicate() {
   IntDecision d = poolManager.getE();
   if (d == null) {
     d = new IntDecision(poolManager);
   }
   d.set(var, value, assignment);
   return d;
 }
コード例 #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;
 }
コード例 #3
0
 @Override
 public void free() {
   poolManager.returnE(this);
 }