@Test(groups="1s", timeOut=60000) public void testDoReduce2() throws Exception { PNG.doReduce(0); Assert.assertFalse(vars[0].contains(0)); }
void doReduce(int lit) throws ContradictionException { int var = var(lit); long value = lit2val[var]; Variable avar = vars[lit2pos[var]]; if (VariableUtils.isInt(avar)) { doReduce((IntVar) avar, sign(lit), value); } else if (VariableUtils.isSet(avar)) { doReduce((SetVar) avar, sign(lit), value); } }
PropNogoods extends Propagator<Variable> { void doReduce(int lit) throws ContradictionException { int var = var(lit); long value = lit2val[var]; Variable avar = vars[lit2pos[var]]; if (VariableUtils.isInt(avar)) { doReduce((IntVar) avar, sign(lit), value); } else if (VariableUtils.isSet(avar)) { doReduce((SetVar) avar, sign(lit), value); } } }
PropNogoods extends Propagator<Variable> { void doReduce(int lit) throws ContradictionException { int var = var(lit); long value = lit2val[var]; Variable avar = vars[lit2pos[var]]; if (VariableUtils.isInt(avar)) { doReduce((IntVar) avar, sign(lit), value); } else if (VariableUtils.isSet(avar)) { doReduce((SetVar) avar, sign(lit), value); } } PropNogoods(Model model); }
PropNogoods extends Propagator<Variable> { void doReduce(int lit) throws ContradictionException { int var = var(lit); long value = lit2val[var]; Variable avar = vars[lit2pos[var]]; if (VariableUtils.isInt(avar)) { doReduce((IntVar) avar, sign(lit), value); } else if (VariableUtils.isSet(avar)) { doReduce((SetVar) avar, sign(lit), value); } } PropNogoods(Model model); @Override void propagate(int evtmask); @Override void propagate(int idxVarInProp, int mask); @Override ESat isEntailed(); void initialize(); int Literal(IntVar ivar, int value, boolean eq); int Literal(SetVar svar, int value, boolean in); @SuppressWarnings("unused") boolean addNogood(int p); @SuppressWarnings("unused") boolean addNogood(TIntList lits); void addLearnt(int... lits); }
PropNogoods extends Propagator<Variable> { void doReduce(int lit) throws ContradictionException { int var = var(lit); long value = lit2val[var]; Variable avar = vars[lit2pos[var]]; if (VariableUtils.isInt(avar)) { doReduce((IntVar) avar, sign(lit), value); } else if (VariableUtils.isSet(avar)) { doReduce((SetVar) avar, sign(lit), value); } } PropNogoods(Model model); @Override void propagate(int evtmask); @Override void propagate(int idxVarInProp, int mask); @Override ESat isEntailed(); void initialize(); int Literal(IntVar ivar, int value, boolean eq); int Literal(SetVar svar, int value, boolean in); @SuppressWarnings("unused") boolean addNogood(int p); @SuppressWarnings("unused") boolean addNogood(TIntList lits); void addLearnt(int... lits);  }